Disable HTML escaping in JSON response

This commit is contained in:
Tobias Gesellchen
2026-02-21 00:42:07 +01:00
parent aced0f3f81
commit dd5aa2ad53
+3 -1
View File
@@ -99,7 +99,9 @@ func (s *Server) HandleMgmtSpotifyInit(w http.ResponseWriter, _ *http.Request) {
redirectURL := svc.BuildAuthorizeURL()
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(map[string]string{
enc := json.NewEncoder(w)
enc.SetEscapeHTML(false)
_ = enc.Encode(map[string]string{
"redirectUrl": redirectURL,
})
}