/usr/share/doc/libghc-xss-sanitize-doc/html/Text-HTML-SanitizeXSS.html is in libghc-xss-sanitize-doc 0.3.5.7-3build7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.HTML.SanitizeXSS</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-HTML-SanitizeXSS.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-HTML-SanitizeXSS.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">xss-sanitize-0.3.5.7: sanitize untrusted HTML to prevent XSS attacks</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Text.HTML.SanitizeXSS</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Sanitize</a></li><li><a href="#g:2">Custom filtering</a></li><li><a href="#g:3">Utilities</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Sanatize HTML to prevent XSS attacks.</p><p>See README.md <a href="http://github.com/gregwebs/haskell-xss-sanitize">http://github.com/gregwebs/haskell-xss-sanitize</a> for more details.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:sanitize">sanitize</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:sanitizeBalance">sanitizeBalance</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:sanitizeXSS">sanitizeXSS</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:filterTags">filterTags</a> :: ([<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>]) -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:safeTags">safeTags</a> :: [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>]</li><li class="src short"><a href="#v:balanceTags">balanceTags</a> :: [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>]</li><li class="src short"><a href="#v:safeTagName">safeTagName</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:sanitizeAttribute">sanitizeAttribute</a> :: (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>)</li><li class="src short"><a href="#v:sanitaryURI">sanitaryURI</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">Sanitize</h1><div class="top"><p class="src"><a id="v:sanitize" class="def">sanitize</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Text-HTML-SanitizeXSS.html#sanitize" class="link">Source</a> <a href="#v:sanitize" class="selflink">#</a></p><div class="doc"><p>Sanitize HTML to prevent XSS attacks. This is equivalent to <code>filterTags safeTags</code>.</p></div></div><div class="top"><p class="src"><a id="v:sanitizeBalance" class="def">sanitizeBalance</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Text-HTML-SanitizeXSS.html#sanitizeBalance" class="link">Source</a> <a href="#v:sanitizeBalance" class="selflink">#</a></p><div class="doc"><p>Sanitize HTML to prevent XSS attacks and also make sure the tags are balanced.
This is equivalent to <code>filterTags (balanceTags . safeTags)</code>.</p></div></div><div class="top"><p class="src"><a id="v:sanitizeXSS" class="def">sanitizeXSS</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Text-HTML-SanitizeXSS.html#sanitizeXSS" class="link">Source</a> <a href="#v:sanitizeXSS" class="selflink">#</a></p><div class="doc"><p>alias of sanitize function</p></div></div><h1 id="g:2">Custom filtering</h1><div class="top"><p class="src"><a id="v:filterTags" class="def">filterTags</a> :: ([<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>]) -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="src/Text-HTML-SanitizeXSS.html#filterTags" class="link">Source</a> <a href="#v:filterTags" class="selflink">#</a></p><div class="doc"><p>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 <code><a href="Text-HTML-SanitizeXSS.html#v:safeTags">safeTags</a></code>!</p></div></div><div class="top"><p class="src"><a id="v:safeTags" class="def">safeTags</a> :: [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] <a href="src/Text-HTML-SanitizeXSS.html#safeTags" class="link">Source</a> <a href="#v:safeTags" class="selflink">#</a></p><div class="doc"><p>Filters out any usafe tags and attributes. Use with filterTags to create a custom filter.</p></div></div><div class="top"><p class="src"><a id="v:balanceTags" class="def">balanceTags</a> :: [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] -> [<a href="file:///usr/share/doc/libghc-tagsoup-doc/html/Text-HTML-TagSoup.html#t:Tag">Tag</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] <a href="src/Text-HTML-SanitizeXSS.html#balanceTags" class="link">Source</a> <a href="#v:balanceTags" class="selflink">#</a></p><div class="doc"><p>Filter which makes sure the tags are balanced. Use with <code><a href="Text-HTML-SanitizeXSS.html#v:filterTags">filterTags</a></code> and <code><a href="Text-HTML-SanitizeXSS.html#v:safeTags">safeTags</a></code> to create a custom filter.</p></div></div><h1 id="g:3">Utilities</h1><div class="top"><p class="src"><a id="v:safeTagName" class="def">safeTagName</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Text-HTML-SanitizeXSS.html#safeTagName" class="link">Source</a> <a href="#v:safeTagName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:sanitizeAttribute" class="def">sanitizeAttribute</a> :: (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>, <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>) <a href="src/Text-HTML-SanitizeXSS.html#sanitizeAttribute" class="link">Source</a> <a href="#v:sanitizeAttribute" class="selflink">#</a></p><div class="doc"><p>low-level API if you have your own HTML parser. Used by safeTags.</p></div></div><div class="top"><p class="src"><a id="v:sanitaryURI" class="def">sanitaryURI</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Text-HTML-SanitizeXSS.html#sanitaryURI" class="link">Source</a> <a href="#v:sanitaryURI" class="selflink">#</a></p><div class="doc"><p>Returns <code>True</code> if the specified URI is not a potential security risk.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|