summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc7
-rw-r--r--program/steps/settings/edit_identity.inc2
2 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 76aa78f4b..6e1126b86 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -20,6 +20,7 @@
*/
require_once('Mail/mimeDecode.php');
+require_once('lib/html2text.inc');
// define constants for message compose mode
define('RCUBE_COMPOSE_REPLY', 0x0106);
@@ -296,6 +297,12 @@ function rcmail_compose_header_from($attrib)
{
$a_signatures[$identity_id]['text'] = $sql_arr['signature'];
$a_signatures[$identity_id]['is_html'] = ($sql_arr['html_signature'] == 1) ? true : false;
+ if ($a_signatures[$identity_id]['is_html'])
+ {
+ $h2t = new html2text($a_signatures[$identity_id]['text'], false, false);
+ $plainTextPart = $h2t->get_text();
+ $a_signatures[$identity_id]['plain_text'] = trim($plainTextPart);
+ }
}
// set identity if it's one of the reply-message recipients
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index a7303bdf0..1ea8947b7 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -56,7 +56,7 @@ function rcube_identity_form($attrib)
"theme_advanced_toolbar_location : 'top'," .
"theme_advanced_toolbar_align : 'left'," .
"theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr'," .
- "theme_advanced_buttons2 : 'link,unlink,forecolor,fontselect,fontsizeselect'," .
+ "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," .
"theme_advanced_buttons3 : '' });");
if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity')