xss-sanitize-0.3.2: sanitize untrusted HTML to prevent XSS attacks

Safe HaskellSafe-Infered

Text.HTML.SanitizeXSS

Synopsis

Documentation

sanitize :: Text -> TextSource

santize the html to prevent XSS attacks. See README.md http://github.com/gregwebs/haskell-xss-sanitize for more details

sanitizeBalance :: Text -> TextSource

same as sanitize but makes sure there are no lone closing tags. See README.md http://github.com/gregwebs/haskell-xss-sanitize for more details

sanitizeXSS :: Text -> TextSource

alias of sanitize function

sanitizeAttribute :: (Text, Text) -> Maybe (Text, Text)Source

low-level API if you have your own HTML parser. Used by safeTags.

filterTags :: ([Tag Text] -> [Tag Text]) -> Text -> TextSource

insert custom tag filtering. Don't forget to compose your filter with safeTags!

safeTags :: [Tag Text] -> [Tag Text]Source

Filters out any usafe tags and attributes. Use with filterTags to create a custom filter.