Documentation
¶
Overview ¶
Package htmlclean sanitizes HTML based on a tag and attribute whitelist.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AcceptableAttributes = map[string]bool{}/* 114 elements not displayed */
Based on list from MDN's HTML attribute reference https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
View Source
var AcceptableElements = map[string]bool{ "noscript": true, "section": true, "nav": true, "article": true, "aside": true, "h1": true, "h2": true, "h3": true, "h4": true, "h5": true, "h6": true, "header": true, "footer": true, "address": true, "main": true, "p": true, "hr": true, "pre": true, "blockquote": true, "ol": true, "ul": true, "li": true, "dl": true, "dt": true, "dd": true, "figure": true, "figcaption": true, "div": true, "a": true, "em": true, "strong": true, "small": true, "s": true, "cite": true, "q": true, "dfn": true, "abbr": true, "data": true, "time": true, "code": true, "var": true, "samp": true, "kbd": true, "sub": true, "sup": true, "i": true, "b": true, "u": true, "mark": true, "ruby": true, "rt": true, "rp": true, "bdi": true, "bdo": true, "span": true, "br": true, "wbr": true, "ins": true, "del": true, "img": true, "iframe": true, "embed": true, "object": true, "param": true, "video": true, "audio": true, "source": true, "track": true, "canvas": true, "map": true, "area": true, "svg": true, "math": true, "table": true, "caption": true, "colgroup": true, "col": true, "tbody": true, "thead": true, "tfoot": true, "tr": true, "td": true, "th": true, "form": true, "fieldset": true, "legend": true, "label": true, "input": true, "button": true, "select": true, "datalist": true, "optgroup": true, "option": true, "textarea": true, "keygen": true, "output": true, "progress": true, "meter": true, }
Based on list from MDN's HTML5 element list https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_element_list
View Source
var AcceptableURISchemes = map[string]bool{ "aim": true, "apt": true, "bitcoin": true, "callto": true, "cvs": true, "facetime": true, "feed": true, "ftp": true, "git": true, "gopher": true, "gtalk": true, "http": true, "https": true, "imap": true, "irc": true, "itms": true, "jabber": true, "magnet": true, "mailto": true, "mms": true, "msnim": true, "news": true, "nntp": true, "rtmp": true, "rtsp": true, "sftp": true, "skype": true, "svn": true, "ymsgr": true, }
Based on list from Wikipedia's URI scheme http://en.wikipedia.org/wiki/URI_scheme
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.