mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -28,6 +28,27 @@ func init() {
|
||||
{`{{ "I :heart: Hugo" | emojify }}`, `I ❤️ Hugo`},
|
||||
{`{{ .Title | markdownify}}`, `<strong>BatMan</strong>`},
|
||||
{`{{ plainify "Hello <strong>world</strong>, gophers!" }}`, `Hello world, gophers!`},
|
||||
{
|
||||
`htmlEscape 1: {{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | safeHTML}}`,
|
||||
`htmlEscape 1: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
{
|
||||
`htmlEscape 2: {{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>"}}`,
|
||||
`htmlEscape 2: Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;`},
|
||||
{
|
||||
`htmlUnescape 1: {{htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | safeHTML}}`,
|
||||
`htmlUnescape 1: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
{
|
||||
`htmlUnescape 2: {{"Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;" | htmlUnescape | htmlUnescape | safeHTML}}`,
|
||||
`htmlUnescape 2: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
{
|
||||
`htmlUnescape 3: {{"Cathal Garvey &amp; The Sunshine Band &lt;cathal@foo.bar&gt;" | htmlUnescape | htmlUnescape }}`,
|
||||
`htmlUnescape 3: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
{
|
||||
`htmlUnescape 4: {{ htmlEscape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | htmlUnescape | safeHTML }}`,
|
||||
`htmlUnescape 4: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
{
|
||||
`htmlUnescape 5: {{ htmlUnescape "Cathal Garvey & The Sunshine Band <cathal@foo.bar>" | htmlEscape | safeHTML }}`,
|
||||
`htmlUnescape 5: Cathal Garvey & The Sunshine Band <cathal@foo.bar>`},
|
||||
}
|
||||
|
||||
return &internal.TemplateFuncsNamespace{
|
||||
|
Reference in New Issue
Block a user