-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | sanitize untrusted HTML to prevent XSS attacks
--   
--   run untrusted HTML through Text.HTML.SanitizeXSS.sanitizeXSS to
--   prevent XSS attacks. see README.md
--   <a>http://github.com/yesodweb/haskell-xss-sanitize</a> for more
--   details
@package xss-sanitize
@version 0.3.5.6


-- | Sanatize HTML to prevent XSS attacks.
--   
--   See README.md <a>http://github.com/gregwebs/haskell-xss-sanitize</a>
--   for more details.
module Text.HTML.SanitizeXSS

-- | Sanitize HTML to prevent XSS attacks. This is equivalent to
--   <tt>filterTags safeTags</tt>.
sanitize :: Text -> Text

-- | Sanitize HTML to prevent XSS attacks and also make sure the tags are
--   balanced. This is equivalent to <tt>filterTags (balanceTags .
--   safeTags)</tt>.
sanitizeBalance :: Text -> Text

-- | alias of sanitize function
sanitizeXSS :: Text -> Text

-- | Parse the given text to a list of tags, apply the given filtering
--   function, and render back to HTML. You can insert your own custom
--   filtering but make sure you compose your filtering function with
--   <a>safeTags</a>!
filterTags :: ([Tag Text] -> [Tag Text]) -> Text -> Text

-- | Filters out any usafe tags and attributes. Use with filterTags to
--   create a custom filter.
safeTags :: [Tag Text] -> [Tag Text]

-- | Filter which makes sure the tags are balanced. Use with
--   <a>filterTags</a> and <a>safeTags</a> to create a custom filter.
balanceTags :: [Tag Text] -> [Tag Text]
safeTagName :: Text -> Bool

-- | low-level API if you have your own HTML parser. Used by safeTags.
sanitizeAttribute :: (Text, Text) -> Maybe (Text, Text)

-- | Returns <tt>True</tt> if the specified URI is not a potential security
--   risk.
sanitaryURI :: Text -> Bool
