diff --git a/lib/loofah/html5/scrub.rb b/lib/loofah/html5/scrub.rb index 8a4c806..e2e3d70 100644 --- a/lib/loofah/html5/scrub.rb +++ b/lib/loofah/html5/scrub.rb @@ -91,7 +91,7 @@ def scrub_css(style) end end.compact unless value.empty? - value += [CSS_IMPORTANT] if node[:important] + value << CSS_IMPORTANT if node[:important] propstring = sprintf "%s:%s", name, value.join(" ") sanitized_node = Crass.parse_properties(propstring).first sanitized_tree << sanitized_node << CRASS_SEMICOLON diff --git a/test/assets/testdata_sanitizer_tests1.dat b/test/assets/testdata_sanitizer_tests1.dat index b564646..a7298ac 100644 --- a/test/assets/testdata_sanitizer_tests1.dat +++ b/test/assets/testdata_sanitizer_tests1.dat @@ -486,10 +486,10 @@ "rexml": "
" }, - { - "name": "style_attr_shorhand_important", + { + "name": "style_attr_shorthand_important", "input": "
", - "output": "
", "xhtml": "
", "rexml": "
" },