From 23d646c456876d06cf48e71c1e57b69de99511f0 Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Mon, 9 Aug 2021 14:44:23 +0000 Subject: [PATCH] fix: escape quote on index template fixes #1501 --- http/static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/static.go b/http/static.go index 850d1134..91a2ab95 100644 --- a/http/static.go +++ b/http/static.go @@ -77,7 +77,7 @@ func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys return http.StatusInternalServerError, err } - data["Json"] = string(b) + data["Json"] = strings.ReplaceAll(string(b), `'`, `\'`) fileContents, err := fs.ReadFile(fSys, file) if err != nil {