Fix missing language name in "Add to Dictionary" request in HTML mode (#1490634)

Conflicts:

	CHANGELOG
pull/319/head
Aleksander Machniak 9 years ago
parent 772e08fa2a
commit fc5befff0f

@ -1,6 +1,9 @@
CHANGELOG Roundcube Webmail CHANGELOG Roundcube Webmail
=========================== ===========================
- Fix missing language name in "Add to Dictionary" request in HTML mode (#1490634)
RELEASE 1.1.4 RELEASE 1.1.4
------------- -------------
- Add workaround for https://bugs.php.net/bug.php?id=70757 (#1490582) - Add workaround for https://bugs.php.net/bug.php?id=70757 (#1490582)

@ -71,6 +71,9 @@ function rcube_text_editor(config, id)
tinymce.registered_request_token = true; tinymce.registered_request_token = true;
tinymce.util.XHR.on('beforeSend', function(e) { tinymce.util.XHR.on('beforeSend', function(e) {
e.xhr.setRequestHeader('X-Roundcube-Request', rcmail.env.request_token); 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();
}); });
} }

Loading…
Cancel
Save