Files
hugo/content/en/functions/_common/go-html-template-package.md
T
Joe Mooring 6bca7bc77f Rework safe functions
Closes #2252
Improves #2196
2024-05-26 11:07:29 -07:00

614 B

Hugo uses Go's text/template and html/template packages.

The text/template package implements data-driven templates for generating textual output, while the html/template package implements data-driven templates for generating HTML output safe against code injection.

By default, Hugo uses the html/template package when rendering HTML files.

To generate HTML output that is safe against code injection, the html/template package escapes strings in certain contexts.