summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2012-04-27 13:28:14 (GMT)
committer Gábor Hojtsy2012-04-27 13:28:14 (GMT)
commitad35cfa86580c7dbbe61ecbdf7f63a7e80cc0b0e (patch)
tree929918049da7eb786612792fd4c74700b1d4ead4
parentdbf4a60b74ba0e72b3f8ca370c951e563cdb52a3 (diff)
Issue #341588 by voxpelli, mikl, Albert Volkman, dawehner: use the right JSON MIME type in drupal_json()
-rw-r--r--includes/common.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 4848f8e..b36805f 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2572,8 +2572,8 @@ function drupal_to_js($var) {
* (optional) If set, the variable will be converted to JSON and output.
*/
function drupal_json($var = NULL) {
- // We are returning JavaScript, so tell the browser.
- drupal_set_header('Content-Type: text/javascript; charset=utf-8');
+ // We are returning JSON, so tell the browser.
+ drupal_set_header('Content-Type: application/json');
if (isset($var)) {
echo drupal_to_js($var);