mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Use template.JS for ShareInfo and APlayerScript
Wrap ShareInfo and APlayerScript with template.JS to ensure they are safely injected as JavaScript in templates, preventing potential escaping issues.
This commit is contained in:
parent
08b5e3bc85
commit
1ddc8ccbf4
@ -183,8 +183,8 @@ func (pub *Router) handleAPlayer(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
data := map[string]interface{}{
|
||||
"ShareDescription": description,
|
||||
"ShareInfo": string(shareInfoJSON),
|
||||
"APlayerScript": string(scriptContent),
|
||||
"ShareInfo": template.JS(shareInfoJSON),
|
||||
"APlayerScript": template.JS(scriptContent),
|
||||
"BaseURL": baseURL,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user