diff options
author | Julian <julian@vantage-design.com> | 2020-10-01 11:06:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 11:06:55 +0300 |
commit | 5944e0e89d899933adae2e82f7142a9e7f921926 (patch) | |
tree | 3f65a75ff0560820cb827b393e0d74ffde0a5e43 | |
parent | 6cfca4c53ea90e498ea5bf3e9fb01b1b02a037e1 (diff) | |
parent | 31bcbb47004aa38fb96be64fe95835ccb70c5650 (diff) |
Merge pull request #23 from sumpfralle/master
Fix potential JSON encoding issues
-rw-r--r-- | layouts/index.json | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/index.json b/layouts/index.json index 84219aa..ab313ca 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -3,9 +3,9 @@ {{- if and $index (gt $index 0) -}},{{- end }} { "uri": "{{ $page.Permalink }}", - "title": "{{ htmlEscape $page.Title}}", - "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], - "description": "{{ htmlEscape .Description}}", + "title": {{ $page.Title | jsonify }}, + "tags": {{ $page.Params.tags | jsonify }}, + "description": {{ .Description | jsonify }}, "content": {{$page.Plain | jsonify}} } {{- end -}} |