Skip to content

Commit 1284173

Browse files
committed
Fixed issue 83 (nasty backtracking in sanitizer regexp)
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401231
1 parent 665800d commit 1284173

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/sanitizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def sanitize_css(self, style):
183183

184184
# gauntlet
185185
if not re.match("""^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$""", style): return ''
186-
if not re.match("^(\s*[-\w]+\s*:\s*[^:;]*(;|$))*$", style): return ''
186+
if not re.match("^(\s*[-\w]+\s*:[^:;]*(;|$))*$", style): return ''
187187

188188
clean = []
189189
for prop,value in re.findall("([-\w]+)\s*:\s*([^:;]*)",style):

0 commit comments

Comments
 (0)