Gopher

safe

Safe is Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

safe.CSS  

(a any) → CSS

CSS returns a given string as html/template CSS content.

Aliases: safeCSS

Examples

{{ "Bat&Man" | safeCSS | safeCSS }}
Bat&Man

safe.HTML  

(a any) → template.HTML

HTML returns a given string as html/template HTML content.

Aliases: safeHTML

Examples

{{ "Bat&Man" | safeHTML | safeHTML }}
Bat&Man
{{ "Bat&Man" | safeHTML }}
Bat&Man

safe.HTMLAttr  

(a any) → HTMLAttr

HTMLAttr returns a given string as html/template HTMLAttr content.

Aliases: safeHTMLAttr

safe.JS  

(a any) → JS

JS returns the given string as a html/template JS content.

Aliases: safeJS

Examples

{{ "(1*2)" | safeJS | safeJS }}
(1*2)

safe.JSStr  

(a any) → JSStr

JSStr returns the given string as a html/template JSStr content.

Aliases: safeJSStr

safe.SanitizeURL  

(a any) → string

SanitizeURL returns a given string as html/template URL content.

Aliases: sanitizeURL, sanitizeurl

safe.URL  

(a any) → URL

URL returns a given string as html/template URL content.

Aliases: safeURL

Examples

{{ "http://gohugo.io" | safeURL | safeURL }}
http://gohugo.io