Skip to content

Commit 8fd1df6

Browse files
committed
Accept space at end of style="x: y; " (related to issue 83).
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401232
1 parent 1284173 commit 8fd1df6

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*:[^:;]*(;|$))*$", style): return ''
186+
if not re.match("^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$", style): return ''
187187

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

0 commit comments

Comments
 (0)