hugo: github.com/gohugoio/hugo/tpl/safe Index | Files

package safe

import "github.com/gohugoio/hugo/tpl/safe"

Index

Package Files

init.go safe.go

type Namespace Uses

type Namespace struct{}

Namespace provides template functions for the "safe" namespace.

func New Uses

func New() *Namespace

New returns a new instance of the safe-namespaced template functions.

func (*Namespace) CSS Uses

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

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

func (*Namespace) HTML Uses

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

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

func (*Namespace) HTMLAttr Uses

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

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

func (*Namespace) JS Uses

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

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

func (*Namespace) JSStr Uses

func (ns *Namespace) JSStr(a interface{}) (template.JSStr, error)

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

func (*Namespace) SanitizeURL Uses

func (ns *Namespace) SanitizeURL(a interface{}) (string, error)

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

func (*Namespace) URL Uses

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

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

Package safe imports 5 packages (graph) and is imported by 2 packages. Updated 2017-06-13. Refresh now. Tools for package owners.