Home | History | Annotate | Download | only in template

Lines Matching defs:template

6 Package template (html/template) implements data-driven templates for
8 same interface as package text/template and should be used instead of
9 text/template whenever the output is HTML.
13 documentation for text/template.
17 This package wraps package text/template so you can share its template API
20 tmpl, err := template.New("name").Parse(...)
31 The security model used by this package assumes that template authors are
37 import "text/template"
39 t, err := template.New("foo").Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
46 but the contextual autoescaping in html/template
48 import "html/template"
50 t, err := template.New("foo").Parse(`{{define "T"}}Hello, {{.}}!{{end}}`)
126 in the escaped template
130 then the template output is
150 The template
156 tmpl.Execute(out, template.HTML(`<b>World</b>`))
173 This package assumes that template authors are trusted, that Execute's data
178 "... when a template author writes an HTML tag in a safe templating language,
184 "... only code specified by the template author should run as a result of
185 injecting the template output into a page and all code specified by the
186 template author should run as a result of the same."
193 package template