r70164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70163‎ | r70164 | r70165 >
Date:18:47, 29 July 2010
Author:simetrical
Status:ok (Comments)
Tags:
Comment:
Whitelist <dfn> element

Bug 671. Harmless, why not. The remaining elements in this vein that
we might want to whitelist include

* <q>: Not yet, inconsistent quote mark handling in browsers
* <address>: Semantics in HTML5 appear to mean it must represent contact
info for the author of the <body> (or <article> if present), which is
almost certain to be useless in user-submitted wiki content; see
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10255
* <kbd>, <samp>: Will add if this is WONTFIXed:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9919
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Sanitizer.php
@@ -367,7 +367,7 @@
368368 'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's',
369369 'strike', 'strong', 'tt', 'var', 'div', 'center',
370370 'blockquote', 'ol', 'ul', 'dl', 'table', 'caption', 'pre',
371 - 'ruby', 'rt' , 'rb' , 'rp', 'p', 'span', 'u', 'abbr'
 371+ 'ruby', 'rt' , 'rb' , 'rp', 'p', 'span', 'u', 'abbr', 'dfn'
372372 );
373373 $htmlsingle = array(
374374 'br', 'hr', 'li', 'dt', 'dd'
@@ -1442,7 +1442,7 @@
14431443 'em' => $common,
14441444 'strong' => $common,
14451445 'cite' => $common,
1446 - # dfn
 1446+ 'dfn' => $common,
14471447 'code' => $common,
14481448 # samp
14491449 # kbd
Index: trunk/phase3/RELEASE-NOTES
@@ -119,6 +119,7 @@
120120 because it encourages edits to be marked minor accidentally and it can be
121121 easily replicated by custom user scripts for those who really want it.
122122 * Non-file pages can no longer be moved to the file namespace, nor vice versa.
 123+* (bug 671) The <dfn> element has been whitelisted in user input.
123124
124125 === Bug fixes in 1.17 ===
125126 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r73880More bug 671: whitelist <kbd> and <samp> for user input. Followup per r70164'...demon11:12, 28 September 2010

Comments

#Comment by 😂 (talk | contribs)   01:25, 28 September 2010

The W3C bug was WONTFIXd. Time to add the other elements?

#Comment by Simetrical (talk | contribs)   07:58, 28 September 2010

Sure. Go ahead if you want.

Status & tagging log