fix: escape quote on index template

fixes #1501
This commit is contained in:
Ramires Viana 2021-08-09 14:44:23 +00:00 committed by Oleg Lobanov
parent 76add9e527
commit 23d646c456
1 changed files with 1 additions and 1 deletions

View File

@ -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 {