summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-16 10:50:36 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-16 10:50:36 +0000
commitbe39272087246738f4608bfb84279078c0d6f4c3 (patch)
tree35e590c7c797e21e9950bf6c7c6624069ed5f00d
parentf277b40bcd62d6e31bf5613092e9fabc67576c80 (diff)
- Don't add PRE tags when switching to html mode and textarea is empty
git-svn-id: https://svn.roundcube.net/trunk@5436 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/js/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index c0da94348..254514558 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -5738,7 +5738,7 @@ function rcube_webmail()
this.plain2html = function(plainText, id)
{
var lock = this.set_busy(true, 'converting');
- $(document.getElementById(id)).val('<pre>'+plainText+'</pre>');
+ $(document.getElementById(id)).val(plainText ? '<pre>'+plainText+'</pre>' : '');
this.set_busy(false, null, lock);
};