Documentation
¶
Index ¶
- func And(args ...any) any
- func EscapeCSS(data ...any) string
- func EscapeComment(...any) string
- func EscapeHTML(data ...any) string
- func EscapeHTMLAttr(data ...any) string
- func EscapeJS(ew io.Writer, data ...any) string
- func EscapeJSRegexp(data ...any) string
- func EscapeJSStr(data ...any) string
- func EscapeJSTmplLit(data ...any) string
- func EscapeRCData(data ...any) string
- func EscapeURL(data ...any) string
- func EscapeUnquotedHTMLAttr(data ...any) string
- func FilterAndEscapeSrcset(ew io.Writer, data ...any) string
- func FilterCSS(data ...any) string
- func FilterHTMLTagContent(data ...any) string
- func FilterURL(ew io.Writer, data ...any) string
- func IsNotTrue(x any) bool
- func IsTrue(x any) bool
- func MayBe[T any](ew io.Writer, fn func() (T, error)) T
- func NormalizeURL(data ...any) string
- func Or(args ...any) any
- func Write(w io.Writer, v any, ew io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
Computes the Boolean AND of its arguments, returning the first false argument it encounters, or the last argument.
func EscapeComment ¶ added in v0.2.0
func EscapeHTMLAttr ¶ added in v0.2.0
Use `template.HTML` or `template.HTMLAttr` to bypass.
func EscapeJS ¶ added in v0.2.0
Checks an input string is valid JSON by unmarshalling it. If failed, then returns ";/* ERROR */null;" and writes an actual error to the optional `ew` writer. Also returns `;` if an input string is empty. Use `template.JS` to bypass.
func EscapeJSStr ¶ added in v0.2.0
Use `template.JSStr` to bypass.
func EscapeJSTmplLit ¶ added in v0.2.0
Use `template.JSStr` to bypass.
func EscapeRCData ¶ added in v0.2.0
Use `template.HTML` to bypass.
func EscapeUnquotedHTMLAttr ¶ added in v0.2.0
Use `template.HTMLAttr` to bypass.
func FilterAndEscapeSrcset ¶ added in v0.2.0
Use `template.Srcset` to bypass.
func FilterHTMLTagContent ¶ added in v0.2.0
Use `template.HTML` to bypass.
func NormalizeURL ¶ added in v0.2.0
Normalizes an input so it can be embedded in double or single quotes. Use `template.URL` to bypass.
Types ¶
This section is empty.