Fix regression in converting signatures to text, fixed PHP warning in html2text() call

pull/294/head
Aleksander Machniak 9 years ago
parent 86b241df63
commit c4daf3f14f

@ -2305,7 +2305,7 @@ class rcmail extends rcube
*
* @return string Plain text
*/
public function html2text($html, $options)
public function html2text($html, $options = array())
{
$default_options = array(
'links' => true,
@ -2314,7 +2314,7 @@ class rcmail extends rcube
'charset' => RCUBE_CHARSET,
);
$options = array_merge($default_options, $options);
$options = array_merge($default_options, (array) $options);
// Plugins may want to modify HTML in another/additional way
$options = $this->plugins->exec_hook('html2text', $options);

@ -499,7 +499,8 @@ function rcmail_compose_header_from($attrib)
$text = $html = $sql_arr['signature'];
if ($sql_arr['html_signature']) {
$text = $RCMAIL->html2text($html);
$text = $RCMAIL->html2text($html, array('links' => false));
$text = trim($text);
}
else {
$t2h = new rcube_text2html($text, false);
@ -1058,7 +1059,7 @@ function rcmail_create_reply_body($body, $bodyIsHtml)
$suffix = '</blockquote>';
}
else {
$suffix = '</blockquote><p></p>';
$suffix = '</blockquote><p><br/></p>';
}
}

Loading…
Cancel
Save