We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c381af8 commit 5d8fecfCopy full SHA for 5d8fecf
include/classes/api.class.php
@@ -37,8 +37,10 @@ function get_json($data, $force=false) {
37
)), $force ? JSON_FORCE_OBJECT : 0
38
);
39
// JSONP support issue #1700
40
- if (isset($_REQUEST['callback']))
+ if (isset($_REQUEST['callback']) && ctype_alpha($_REQUEST['callback'])) {
41
+ header('Content-type: application/json; charset=utf-8');
42
return $_REQUEST['callback'] . '(' . $json . ');';
43
+ }
44
return $json;
45
}
46
0 commit comments