Przeglądaj źródła

FIX html encoding

boyska 6 lat temu
rodzic
commit
94b90af504
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      httpui.go

+ 2 - 2
httpui.go

@@ -46,7 +46,7 @@ func (mu *MegaUploader) home(w http.ResponseWriter, r *http.Request) {
 	}
 	user, _ := getUser(r)
 	shares := mu.Conf.GetAuthShares(user)
-	w.Header().Set("Content-Type", "text/html")
+	w.Header().Set("Content-Type", "text/html; charset=utf-8")
 	tmpl.Execute(w, map[string]interface{}{
 		"Prefix": mu.Conf.Global.RoutePrefix,
 		"Shares": shares,
@@ -72,7 +72,7 @@ func (mu *MegaUploader) uploadUI(w http.ResponseWriter, r *http.Request) {
 	if err != nil {
 		viewurl = url.URL{}
 	}
-	w.Header().Set("Content-Type", "text/html")
+	w.Header().Set("Content-Type", "text/html; charset=utf-8")
 	tmpl.Execute(w, map[string]interface{}{
 		"Prefix":  mu.Conf.Global.RoutePrefix,
 		"Share":   share,