mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
making translations a bit more resilient for wrong charset
This commit is contained in:
parent
3552afa91c
commit
a361d05767
@ -61,7 +61,9 @@ if (!count(Api\Translation::$lang_arr))
|
||||
}
|
||||
|
||||
// fix for phrases containing \n
|
||||
$content = 'egw.set_lang_arr("'.$_GET['app'].'", '.str_replace('\\\\n', '\\n', json_encode(Api\Translation::$lang_arr)).', egw && egw.window !== window);';
|
||||
$content = 'egw.set_lang_arr("'.$_GET['app'].'", '.str_replace('\\\\n', '\\n',
|
||||
json_encode(Api\Translation::$lang_arr, JSON_PARTIAL_OUTPUT_ON_ERROR|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE)).
|
||||
', egw && egw.window !== window);';
|
||||
|
||||
// we run our own gzip compression, to set a correct Content-Length of the encoded content
|
||||
if (in_array('gzip', explode(',',$_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))
|
||||
|
@ -434,7 +434,7 @@ class Accounts
|
||||
$account['apps'][$app] = $data;
|
||||
}
|
||||
}
|
||||
return json_encode($account);
|
||||
return json_encode($account, JSON_PARTIAL_OUTPUT_ON_ERROR|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user