summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-16 10:50:36 +0000
committeralecpl <alec@alec.pl>2011-11-16 10:50:36 +0000
commitfa9edc3daa049e894e76a2034018c4b970bd8e06 (patch)
treea3a0e65b880106465b67046553559b614e30c1b4
parent91e589afde27c23db50677953f0ebce4aa7b7a3b (diff)
- Don't add PRE tags when switching to html mode and textarea is empty
-rw-r--r--program/js/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index c0da94348..254514558 100644
--- a/program/js/app.js
+++ b/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);
};