From 2ccba79cba656a5a220e7323519173db2d38b9ed Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 28 Apr 2020 13:01:11 +0800 Subject: [PATCH] fix: search index content htmlEscape --- layouts/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.json b/layouts/index.json index 46ee7ef6..65f23c60 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -11,7 +11,7 @@ {{- $one = delimit $tags "\n" | dict "tags" | merge $one -}} {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}} {{- $one = dict "date" $publish_date | merge $one -}} - {{- $content := .RawContent -}} + {{- $content := .RawContent | htmlEscape -}} {{- if gt .Site.Params.search.contentLength 0 -}} {{- $content = substr $content 0 .Site.Params.search.contentLength -}} {{- end -}}