Commit 91c7635d authored by astaxie's avatar astaxie

fix #283

parent 2a81595c
......@@ -8,6 +8,7 @@ import (
"encoding/xml"
"errors"
"fmt"
"html/template"
"io"
"mime"
"net/http"
......@@ -157,7 +158,7 @@ func (output *BeegoOutput) Jsonp(data interface{}, hasIndent bool) error {
if callback == "" {
return errors.New(`"callback" parameter required`)
}
callback_content := bytes.NewBufferString(callback)
callback_content := bytes.NewBufferString(template.JSEscapeString(callback))
callback_content.WriteString("(")
callback_content.Write(content)
callback_content.WriteString(");\r\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment