Copyright © 2009 Marc Worrell Date: 2009-04-17
Authors: Marc Worrell (marc@worrell.nl).
ensure_escaped_amp/1 | Ensure that & -characters are properly escaped inside a html string. |
escape/1 | Escape a string so that it is valid within HTML/ XML. |
escape_link/1 | Escape a text. |
escape_props/1 | Escape all properties used for an update statement. |
nl2br/1 | Translate any newlines to html br entities. |
noscript/1 | Filter a url, remove any javascript. |
sanitize/1 | Sanitize a (X)HTML string. |
scrape_link_elements/1 | Given a HTML list, scrape all <link> elements and return their attributes. |
strip/1 | Strip all html elements from the text. |
unescape/1 | Unescape - reverses the effect of escape. |
ensure_escaped_amp(B) -> any()
Ensure that &
-characters are properly escaped inside a html string.
escape(L::iolist()) -> binary()
Escape a string so that it is valid within HTML/ XML.
escape_link(Text) -> binary()
Escape a text. Expands any urls to links with a nofollow attribute.
escape_props(Props::PropertyList) -> PropertyList
Escape all properties used for an update statement. Only leaves the body property in tact.
nl2br(B) -> any()
Translate any newlines to html br entities.
noscript(Url) -> any()
Filter a url, remove any javascript.
sanitize(Html::binary()) -> binary()
Sanitize a (X)HTML string. Remove elements and attributes that might be harmful.
scrape_link_elements(Html::string()) -> [LinkAttributes]
Given a HTML list, scrape all <link>
elements and return their attributes. Attribute names are lowercased.
Strip all html elements from the text. Simple parsing is applied to find the elements. Does not escape the end result.
unescape(L::iolist()) -> binary()
Unescape - reverses the effect of escape.
Generated by EDoc, Feb 25 2011, 21:14:41.