Versions in this module Expand all Collapse all v1 v1.0.20 Jun 26, 2022 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) AllowComments() + 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) AllowElementsMatching(regex *regexp.Regexp) *Policy + func (p *Policy) AllowIFrames(vals ...SandboxValue) + 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) AllowStyles(propertyNames ...string) *stylePolicyBuilder + 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) AllowUnsafe(allowUnsafe bool) *Policy + func (p *Policy) RequireCrossOriginAnonymous(require bool) *Policy + func (p *Policy) RequireNoFollowOnFullyQualifiedLinks(require bool) *Policy + func (p *Policy) RequireNoFollowOnLinks(require bool) *Policy + func (p *Policy) RequireNoReferrerOnFullyQualifiedLinks(require bool) *Policy + func (p *Policy) RequireNoReferrerOnLinks(require bool) *Policy + func (p *Policy) RequireParseableURLs(require bool) *Policy + func (p *Policy) RequireSandboxOnIFrame(vals ...SandboxValue) + 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) SanitizeReaderToWriter(r io.Reader, w io.Writer) error + func (p *Policy) SkipElementsContent(names ...string) *Policy + type Query struct + HasValue bool + Key string + Value string + type SandboxValue int64 + const SandboxAllowDownloads + const SandboxAllowDownloadsWithoutUserActivation + const SandboxAllowForms + const SandboxAllowModals + const SandboxAllowOrientationLock + const SandboxAllowPointerLock + const SandboxAllowPopups + const SandboxAllowPopupsToEscapeSandbox + const SandboxAllowPresentation + const SandboxAllowSameOrigin + const SandboxAllowScripts + const SandboxAllowStorageAccessByUserActivation + const SandboxAllowTopNavigation + const SandboxAllowTopNavigationByUserActivation