From fc5befff0f1aec5f9529a1892dd274350ab0f9e6 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 8 Jan 2016 10:56:17 +0100 Subject: [PATCH] Fix missing language name in "Add to Dictionary" request in HTML mode (#1490634) Conflicts: CHANGELOG --- CHANGELOG | 3 +++ program/js/editor.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e05a1ae84..01974c008 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ CHANGELOG Roundcube Webmail =========================== + +- Fix missing language name in "Add to Dictionary" request in HTML mode (#1490634) + RELEASE 1.1.4 ------------- - Add workaround for https://bugs.php.net/bug.php?id=70757 (#1490582) diff --git a/program/js/editor.js b/program/js/editor.js index 50b7228b8..ddf599a7b 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -71,6 +71,9 @@ function rcube_text_editor(config, id) tinymce.registered_request_token = true; tinymce.util.XHR.on('beforeSend', function(e) { e.xhr.setRequestHeader('X-Roundcube-Request', rcmail.env.request_token); + // Fix missing lang parameter on addToDictionary request (#1490634) + if (e.settings && e.settings.data && /^method=addToDictionary/.test(e.settings.data) && !/&lang=/.test(e.settings.data)) + e.settings.data += '&lang=' + ref.editor.plugins.spellchecker.getLanguage(); }); }