Versions in this module Expand all Collapse all v1 v1.0.1 Aug 19, 2018 v1.0.0 Jul 15, 2018 Changes in this version + var CellAlign = regexp.MustCompile(`(?i)^(center|justify|left|right|char)$`) + var CellVerticalAlign = regexp.MustCompile(`(?i)^(baseline|bottom|middle|top)$`) + var Direction = regexp.MustCompile(`(?i)^(rtl|ltr)$`) + var ISO8601 = regexp.MustCompile(...) + var ImageAlign = regexp.MustCompile(`(?i)^(left|right|top|texttop|middle|absmiddle|baseline|bottom|absbottom)$`) + var Integer = regexp.MustCompile(`^[0-9]+$`) + var ListType = regexp.MustCompile(`(?i)^(circle|disc|square|a|A|i|I|1)$`) + var Number = regexp.MustCompile(`^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$`) + var NumberOrPercent = regexp.MustCompile(`^[0-9]+[%]?$`) + var Paragraph = regexp.MustCompile(`^[\p{L}\p{N}\s\-_',\[\]!\./\\\(\)]*$`) + var SpaceSeparatedTokens = regexp.MustCompile(`^([\s\p{L}\p{N}_-]+)$`) + type Policy struct + func NewPolicy() *Policy + func StrictPolicy() *Policy + func StripTagsPolicy() *Policy + func UGCPolicy() *Policy + func (p *Policy) AddSpaceWhenStrippingTag(allow bool) *Policy + func (p *Policy) AddTargetBlankToFullyQualifiedLinks(require bool) *Policy + func (p *Policy) AllowAttrs(attrNames ...string) *attrPolicyBuilder + func (p *Policy) AllowDataAttributes() + func (p *Policy) AllowDataURIImages() + func (p *Policy) AllowElements(names ...string) *Policy + func (p *Policy) AllowElementsContent(names ...string) *Policy + func (p *Policy) AllowImages() + func (p *Policy) AllowLists() + func (p *Policy) AllowNoAttrs() *attrPolicyBuilder + func (p *Policy) AllowRelativeURLs(require bool) *Policy + func (p *Policy) AllowStandardAttributes() + func (p *Policy) AllowStandardURLs() + func (p *Policy) AllowStyling() + func (p *Policy) AllowTables() + func (p *Policy) AllowURLSchemeWithCustomPolicy(scheme string, urlPolicy func(url *url.URL) (allowUrl bool)) *Policy + func (p *Policy) AllowURLSchemes(schemes ...string) *Policy + func (p *Policy) RequireNoFollowOnFullyQualifiedLinks(require bool) *Policy + func (p *Policy) RequireNoFollowOnLinks(require bool) *Policy + func (p *Policy) RequireParseableURLs(require bool) *Policy + func (p *Policy) Sanitize(s string) string + func (p *Policy) SanitizeBytes(b []byte) []byte + func (p *Policy) SanitizeReader(r io.Reader) *bytes.Buffer + func (p *Policy) SkipElementsContent(names ...string) *Policy