From c406bda0c73ac8b187e23a97c05521edc77efa84 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 28 Mar 2026 19:54:21 +0100 Subject: [PATCH] fix: json escaping --- http/static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/static.go b/http/static.go index f544618b..7580f170 100644 --- a/http/static.go +++ b/http/static.go @@ -85,7 +85,7 @@ func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys return http.StatusInternalServerError, err } - data["Json"] = strings.ReplaceAll(string(b), `'`, `\'`) + data["Json"] = template.JS(strings.ReplaceAll(string(b), `'`, `\'`)) fileContents, err := fs.ReadFile(fSys, file) if err != nil {