mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
title: safeJS
|
||||
# linktitle:
|
||||
description: Declares the provided string as a known safe JavaScript string.
|
||||
godocref: https://golang.org/src/html/template/content.go?s=2548:2557#L51
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
@@ -28,4 +27,3 @@ Example: Given `hash = "619c16f"` defined in the front matter of your `.md` file
|
||||
|
||||
* <span class="good">`<script>var form_{{ .Params.hash | safeJS }};…</script>` → `<script>var form_619c16f;…</script>`</span>
|
||||
* <span class="bad">`<script>var form_{{ .Params.hash }};…</script>` → `<script>var form_"619c16f";…</script>`</span>
|
||||
|
||||
|
Reference in New Issue
Block a user