Workaround for download correctly json data in IE

This commit is contained in:
Manuel Cillero 2017-07-25 13:09:34 +02:00
parent 893f61f947
commit 3e27c84bbd

View file

@ -2613,7 +2613,10 @@ function drupal_to_js($var) {
*/
function drupal_json($var = NULL) {
// We are returning JSON, so tell the browser.
drupal_set_header('Content-Type: application/json');
// drupal_set_header('Content-Type: application/json');
// Workaround while waiting an adecuate solution:
// https://suitedesk.cillero.es/ticket/3639#comment-3648
drupal_set_header('Content-Type: text/html; charset=utf-8');
if (isset($var)) {
echo drupal_to_js($var);