fix(backend): broken utf8 on raw view

This commit is contained in:
Ada 2023-11-26 02:53:24 +01:00
parent 6289e90d01
commit c68a989d25

View file

@ -34,7 +34,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
if UrlExist(clearPath) {
if strings.HasSuffix(path, "/raw") {
pasteContent := getContent(clearPath)
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
_, err := io.WriteString(w, pasteContent)
if err != nil {
log.Println(err)