From: Sean Colombo Date: Wed, 11 Aug 2010 07:19:26 +0000 (+0000) Subject: Fix to #17031. See bug ticket for test code & test-results. X-Git-Tag: 1.31.0-rc.0~35557 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=13632f8082ecae3d70c749d6093b2b4f691fdb5f;p=lhc%2Fweb%2Fwiklou.git Fix to #17031. See bug ticket for test code & test-results. --- diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index e8a3a38a5d..c0b85f962b 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -40,10 +40,11 @@ define( 'MW_CHAR_REFS_REGEX', * Allows some... latitude. * Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes */ -$attrib = '[A-Za-z0-9]'; +$attrib_first = '[:A-Z_a-z]'; +$attrib = '[:A-Z_a-z-.0-9]'; $space = '[\x09\x0a\x0d\x20]'; define( 'MW_ATTRIBS_REGEX', - "/(?:^|$space)((?:xml:|xmlns:)?$attrib+) + "/(?:^|$space)({$attrib_first}{$attrib}*) ($space*=$space* (?: # The attribute value: quoted or alone