Skip conversion/formatting if there is no content
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Aug 2010 16:19:24 +0000 (10:19 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Aug 2010 16:19:24 +0000 (10:19 -0600)
imp/lib/Prefs/Ui.php

index bbea9f4..2b94078 100644 (file)
@@ -1646,7 +1646,7 @@ class IMP_Prefs_Ui
             ? $ui->vars->type
             : 'plain';
 
-        if ($ui->vars->last_type != $type) {
+        if ($content && ($ui->vars->last_type != $type)) {
             $content = ($type == 'plain')
                 ? $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($content, 'Html2text')
                 : nl2br(htmlspecialchars(htmlspecialchars($content)));