Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultIgnoredHTMLTags - // Form, input, selects // Plugin DefaultIgnoredHTMLTags = []atom.Atom{ atom.Script, atom.Style, atom.Iframe, atom.Hr, atom.Form, atom.Input, atom.Select, atom.Label, atom.Fieldset, atom.Button, atom.Textarea, atom.Noembed, atom.Embed, atom.Object, atom.Base, atom.Canvas, atom.Svg, } // DefaultAllowedHTMLAttributes - // http-equiv, content & charset tags should be always present // since they handles HTML encoding DefaultAllowedHTMLAttributes = []string{ "src", "href", "title", "alt", "rel", "http-equiv", "content", "name", "description", "charset", "lang", "itemprop", "itemscope", "itemref", "itemtype", } )
Functions ¶
Types ¶
type FilterTokenFunc ¶
FilterTokenFunc - callback function process token
type Tags ¶
type Tags struct { // IgnoredHTMLTags - contains tags which will be ignored/removed IgnoredHTMLTags []atom.Atom // AllowedHTMLAttributes - contains HTML attributes AllowedHTMLAttributes []string // AllowIEComments - ignore or save IE comments AllowIEComments bool }
Tags - HTML tags structure
func NewTags ¶
func NewTags() *Tags
NewTags - initializes Tags with default values defaults can be overridden on Tags initialization
func (*Tags) IsAllowedAttribute ¶
IsAllowedAttribute - checks whether HTML attribute is allowed
Click to show internal directories.
Click to hide internal directories.