r82475 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82474‎ | r82475 | r82476 >
Date:19:25, 19 February 2011
Author:sean_colombo
Status:ok (Comments)
Tags:
Comment:
Relaxed the allowed format of parser tag attributes as per bug 27539. One side-effect is that this will fix the widely-used pagelist tag which has "1to10" as an attribute name.
Modified paths:
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Sanitizer.php
@@ -39,7 +39,7 @@
4040 * Allows some... latitude.
4141 * Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes
4242 */
43 -$attribFirst = '[:A-Z_a-z]';
 43+$attribFirst = '[:A-Z_a-z-.0-9]'; // more lenient than standards (by allowing [-.0-9])
4444 $attrib = '[:A-Z_a-z-.0-9]';
4545 $space = '[\x09\x0a\x0d\x20]';
4646 define( 'MW_ATTRIBS_REGEX',

Follow-up revisions

RevisionCommit summaryAuthorDate
r82480(Bug 27539) Allow attributes beginning with a digit in wiktext tag parameters....platonides20:16, 19 February 2011
r825761.17wmf1: MFT r82475, r82480, r82538, r82547, r82550, r82552, r82554, r82555,...catrope21:37, 21 February 2011
r85211MFT: r82297, r82307, r82309, r82312, r82315, r82337, r82391, r82392, r82403, ...demon21:01, 2 April 2011

Comments

#Comment by Platonides (talk | contribs)   20:18, 19 February 2011

- and . removed in r82480

Status & tagging log