Page MenuHomePhabricator

Sanitizer.patch

Authored By
bzimport
Nov 21 2014, 10:25 PM
Size
581 B
Referenced Files
None
Subscribers
None

Sanitizer.patch

Index: Sanitizer.php
===================================================================
--- Sanitizer.php (revision 45716)
+++ Sanitizer.php (working copy)
@@ -40,10 +40,11 @@
* 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)($attrib+)
+ "/(?:^|$space)({$attrib_first}{$attrib}*)
($space*=$space*
(?:
# The attribute value: quoted or alone

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4867
Default Alt Text
Sanitizer.patch (581 B)

Event Timeline