Safe functions
Use these functions to declare a value as safe in the context of Go’s html/template package.
Use these functions to declare a value as safe in the context of Go’s html/template package.
safe.CSS INPUT ⟼ template.CSSDeclares the given string as a safe CSS string. Read More »
safe.HTML INPUT ⟼ template.HTMLDeclares the given string as a safeHTML string. Read More »
safe.HTMLAttr INPUT ⟼ template.HTMLAttrDeclares the given key-value pair as a safe HTML attribute. Read More »
safe.JS INPUT ⟼ template.JSDeclares the given string as a safe JavaScript expression. Read More »
safe.JSStr INPUT ⟼ template.JSStrDeclares the given string as a safe JavaScript string. Read More »
safe.URL INPUT ⟼ template.URLDeclares the given string as a safe URL or URL substring. Read More »