Browse code

BM-15165 Fix: mailtip, encode query param

David Phan authored on 02/10/2019 13:49:54
Showing 1 changed files
... ...
@@ -40,7 +40,7 @@ rcube_webmail.prototype.bm_mailtips_get_mailtips = function() {
40 40
   if ((_to.length + _cc.length + _bcc.length) == 0) {
41 41
     return false;
42 42
   }
43
-  var query = '_from=' + input_from.val() + '&_subject=' + input_subject.val() + '&_to=' + _to.join(', ') + '&_cc=' + _cc.join(', ') + '&_bcc=' + _bcc.join(', ');
43
+  var query = '_from=' + encodeURIComponent(input_from.val()) + '&_subject=' + encodeURIComponent(input_subject.val()) + '&_to=' + encodeURIComponent(_to.join(', ')) + '&_cc=' + encodeURIComponent(_cc.join(', ') + '&_bcc=' + encodeURIComponent(_bcc.join(', '));
44 44
   if (query != rcmail.bm_mailtips.query) {
45 45
     rcmail.bm_mailtips.query = query;
46 46
     rcmail.http_post('plugin.bm_mailtips.getmailtips', query);