Sanitize HTML to prevent XSS attacks. This is equivalent to filterTags safeTags.
Modulexss-sanitize-0.3.7.2Haskell2010
Text.HTML.SanitizeXSS
Sanatize HTML to prevent XSS attacks.
See README.md http://github.com/gregwebs/haskell-xss-sanitize for more details.
- 12 values
- Packagexss-sanitize-0.3.7.2
- Exports12
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceSanitizeXSS.hs
Sanitize
3 declarationsSanitize HTML to prevent XSS attacks and also make sure the tags are balanced.
This is equivalent to filterTags (balanceTags . safeTags).
alias of sanitize function
Custom filtering
6 declarationsParse 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 safeTags and clearTags or safeTagsCustom and clearTagsCustom.
Filters out unsafe tags and sanitizes attributes. Use with filterTags to create a custom filter.
safeTagsCustom Filters out unsafe tags and sanitizes attributes, like safeTags, but uses custom functions for determining which tags are safe and for sanitizing attributes. This allows you to add or remove specific tags or attributes on the white list, or to use your own white list.
safeTagsCustom safeTagName sanitizeAttribute is equivalent to
safeTags.
Directly removes tags, like clearTags, but uses a custom function for determining which tags are safe.
clearTagsCustom clearableTagName is equivalent to
clearTags.
Filter which makes sure the tags are balanced. Use with filterTags and safeTags to create a custom filter.
Utilities
3 declarationslow-level API if you have your own HTML parser. Used by safeTags.
Returns True if the specified URI is not a potential security risk.