diff --git a/includes/common.inc b/includes/common.inc index 80822d4..08feb62 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2577,8 +2577,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; charset=utf-8'); if (isset($var)) { echo drupal_to_js($var);