| Index: trunk/phase3/includes/Sanitizer.php |
| — | — | @@ -40,10 +40,11 @@ |
| 41 | 41 | * Allows some... latitude. |
| 42 | 42 | * Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes |
| 43 | 43 | */ |
| 44 | | -$attrib = '[A-Za-z0-9]'; |
| | 44 | +$attrib_first = '[:A-Z_a-z]'; |
| | 45 | +$attrib = '[:A-Z_a-z-.0-9]'; |
| 45 | 46 | $space = '[\x09\x0a\x0d\x20]'; |
| 46 | 47 | define( 'MW_ATTRIBS_REGEX', |
| 47 | | - "/(?:^|$space)((?:xml:|xmlns:)?$attrib+) |
| | 48 | + "/(?:^|$space)({$attrib_first}{$attrib}*) |
| 48 | 49 | ($space*=$space* |
| 49 | 50 | (?: |
| 50 | 51 | # The attribute value: quoted or alone |