diff options
author | Marcel Klehr <mklehr@gmx.net> | 2012-12-19 19:48:08 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2012-12-23 18:17:01 +0100 |
commit | 3c3c1630b1a0212b6338ead13ae4bd7ce50a1067 (patch) | |
tree | e05d26fcb907f586565645ac85c4a04489c72510 /src/node/hooks | |
parent | 00d7ebc646e648273131dc0d61ce311de88fc49c (diff) | |
download | etherpad-lite-3c3c1630b1a0212b6338ead13ae4bd7ce50a1067.zip |
Revert "Don't tell IE it's utf8. Just send it. Otherwise it'll snuff it!"
This reverts commit 5fb7a03fb34078a75fe5932563e5a9fe44c57015.
Diffstat (limited to 'src/node/hooks')
-rw-r--r-- | src/node/hooks/i18n.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/node/hooks/i18n.js b/src/node/hooks/i18n.js index c947c896..03094dad 100644 --- a/src/node/hooks/i18n.js +++ b/src/node/hooks/i18n.js @@ -110,16 +110,15 @@ exports.expressCreateServer = function(n, args) { //works with /locale/en and /locale/en.json requests var locale = req.params.locale.split('.')[0]; if (exports.availableLangs.hasOwnProperty(locale)) { - // Don't include utf8 encoding (see https://forum.jquery.com/topic/the-problem-with-ie8-and-encoding-error-c00ce56e) - res.setHeader('Content-Type', 'application/json'); - res.send('{"'+locale+'":'+JSON.stringify(locales[locale])+'}'); + res.setHeader('Content-Type', 'application/json; charset=utf8'); + res.send('{"'+locale+'":'+JSON.stringify(locales[locale])+'}'); } else { res.send(404, 'Language not available'); } }) args.app.get('/locales.json', function(req, res) { - res.setHeader('Content-Type', 'application/json');// don't send encoding (see above) + res.setHeader('Content-Type', 'application/json; charset=utf8'); res.send(localeIndex); }) |