safe

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package safe provides funcs that will allow trusted content into a template without being escaped.

Portions Copyright The Hugo Authors and covered by both an MIT license for the original code, and an Apache license for later modifications. https://github.com/spf13/hugo/blob/master/tpl/template_funcs.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSS

func CSS(a interface{}) (template.CSS, error)

CSS returns a given string as html/template CSS content

Use of this func presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output

func HTML

func HTML(a interface{}) (template.HTML, error)

HTML returns a given string as html/template HTML content

Use of this func presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output

func HTMLAttr

func HTMLAttr(a interface{}) (template.HTMLAttr, error)

HTMLAttr returns a given string as html/template HTMLAttr content

Use of this func presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output

func JS

func JS(a interface{}) (template.JS, error)

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

Use of this func presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output

func URL

func URL(a interface{}) (template.URL, error)

URL returns a given string as html/template URL content

Use of this func presents a security risk: the encapsulated content should come from a trusted source, as it will be included verbatim in the template output

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL