Relaxed the allowed format of parser tag attributes as per bug 27539. One side-effect...
authorSean Colombo <sean_colombo@users.mediawiki.org>
Sat, 19 Feb 2011 19:25:26 +0000 (19:25 +0000)
committerSean Colombo <sean_colombo@users.mediawiki.org>
Sat, 19 Feb 2011 19:25:26 +0000 (19:25 +0000)
includes/Sanitizer.php

index 9585f9a..9a64e2c 100644 (file)
@@ -39,7 +39,7 @@ define( 'MW_CHAR_REFS_REGEX',
  * Allows some... latitude.
  * Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes
  */
-$attribFirst = '[:A-Z_a-z]';
+$attribFirst = '[:A-Z_a-z-.0-9]'; // more lenient than standards (by allowing [-.0-9])
 $attrib = '[:A-Z_a-z-.0-9]';
 $space = '[\x09\x0a\x0d\x20]';
 define( 'MW_ATTRIBS_REGEX',