Skip to content

Commit

Permalink
fix: escape quote on index template
Browse files Browse the repository at this point in the history
fixes #1501
  • Loading branch information
ramiresviana authored and o1egl committed Aug 20, 2021
1 parent 76add9e commit 23d646c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 23d646c

Please sign in to comment.