Skip to content

Commit b41d91c

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 70608a6 commit b41d91c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/html5/sanitizer.rb

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

169169
# gauntlet
170170
return '' unless style =~ /^([-:,;#%.\sa-zA-Z0-9!]|\w-\w|\'[\s\w]+\'|\"[\s\w]+\"|\([\d,\s]+\))*$/
171-
return '' unless style =~ /^(\s*[-\w]+\s*:[^:;]*(;|$))*$/
171+
return '' unless style =~ /^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$/
172172

173173
clean = []
174174
style.scan(/([-\w]+)\s*:\s*([^:;]*)/) do |prop, val|

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy