summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-28 08:10:44 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-28 08:10:44 +0000
commit08267eacc7565a3f2f8956bfb51dabcd45ce2472 (patch)
treec584b46b9d3b248441b94837a47db5fab58dc0b4 /roundcubemail/program/js
parentfed78eb7fffa97b0939046977d147b9acd1a480d (diff)
- Fix handling HTML entities when converting HTML to text (#1488212)
git-svn-id: https://svn.roundcube.net/trunk@5497 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 22ff4c98f..f17e2f432 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -5765,10 +5765,13 @@ function rcube_webmail()
});
};
- this.plain2html = function(plainText, id)
+ this.plain2html = function(plain, id)
{
var lock = this.set_busy(true, 'converting');
- $('#'+id).val(plainText ? '<pre>'+plainText+'</pre>' : '');
+
+ plain = plain.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+ $('#'+id).val(plain ? '<pre>'+plain+'</pre>' : '');
+
this.set_busy(false, null, lock);
};