File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,16 +141,16 @@ func JsonpHandler(c *gin.Context) {
141
141
142
142
callback := c .Query ("callback" )
143
143
if callback == "" {
144
- c .String (200 , "try{console.error(%s )}catch{}" , "missing callback parameter" )
144
+ c .String (200 , "try{console.error('%s' )}catch{}" , "missing callback parameter" )
145
145
return
146
146
}
147
147
148
148
u , err := url .Parse (c .GetHeader ("Referer" ))
149
149
if err != nil {
150
- c .String (200 , "try{console.error(%s )}catch{}" , "unable to parse referer" )
150
+ c .String (200 , "try{console.error('%s' )}catch{}" , "unable to parse referer" )
151
151
return
152
152
} else if u .Host == "" {
153
- c .String (200 , "try{console.error(%s )}catch{}" , "invalid referer" )
153
+ c .String (200 , "try{console.error('%s' )}catch{}" , "invalid referer" )
154
154
return
155
155
}
156
156
@@ -166,7 +166,7 @@ func JsonpHandler(c *gin.Context) {
166
166
}
167
167
jsonData , err := json .Marshal (data )
168
168
if err != nil {
169
- c .String (200 , "try{console.error(%s )}catch{}" , "gen json failed" )
169
+ c .String (200 , "try{console.error('%s' )}catch{}" , "gen json failed" )
170
170
return
171
171
}
172
172
You can’t perform that action at this time.
0 commit comments