diff --git a/Text/HTML/SanitizeXSS.hs b/Text/HTML/SanitizeXSS.hs index 8b1cf65..ac8e10d 100644 --- a/Text/HTML/SanitizeXSS.hs +++ b/Text/HTML/SanitizeXSS.hs @@ -87,7 +87,7 @@ safeAttribute (name, value) = name `member` sanitaryAttributes && (name `notMember` uri_attributes || sanitaryURI value) sanitizeAttribute :: (Text, Text) -> Maybe (Text, Text) -sanitizeAttribute ("style", value) = +sanitizeAttribute ("style", value) = let css = sanitizeCSS value in if T.null css then Nothing else Just ("style", css) sanitizeAttribute attr = Just attr diff --git a/Text/HTML/SanitizeXSS/Css.hs b/Text/HTML/SanitizeXSS/Css.hs index 108ff00..f2a9a79 100644 --- a/Text/HTML/SanitizeXSS/Css.hs +++ b/Text/HTML/SanitizeXSS/Css.hs @@ -63,7 +63,7 @@ sanitizeCSS css = toStrict . toLazyText . allowed_css_unit_properties = fromList ["background","border","margin","padding"] allowedCssAttributeValue :: Text -> Bool -allowedCssAttributeValue val = +allowedCssAttributeValue val = val `member` allowed_css_keywords || case parseOnly allowedCssAttributeParser val of Left _ -> False