Browse Source

Fix JSON template for Go 1.5 and before

pull/402/head
Leon Klingele 9 years ago committed by Leon Klingele
parent
commit
a3b0a2fcf0
No known key found for this signature in database
GPG Key ID: 83AEC0FEBAA5D483
  1. 4
      src/app/spreed-webrtc-server/main.go

4
src/app/spreed-webrtc-server/main.go

@ -210,12 +210,12 @@ func runner(runtime phoenix.Runtime) error { @@ -210,12 +210,12 @@ func runner(runtime phoenix.Runtime) error {
// Load templates.
templateFuncMap := template.FuncMap{
"json": func(obj interface{}) (template.HTML, error) {
"json": func(obj interface{}) (template.JS, error) {
data, err := json.Marshal(obj)
if err != nil {
return "", err
}
return template.HTML(data), nil
return template.JS(data), nil
},
}
templates = template.New("")

Loading…
Cancel
Save