Fix regression in converting signatures to text, fixed PHP warning in html2text() call
| | |
| | | * |
| | | * @return string Plain text |
| | | */ |
| | | public function html2text($html, $options) |
| | | public function html2text($html, $options = array()) |
| | | { |
| | | $default_options = array( |
| | | 'links' => true, |
| | |
| | | '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); |
| | |
| | | $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); |
| | |
| | | $suffix = '</blockquote>'; |
| | | } |
| | | else { |
| | | $suffix = '</blockquote><p></p>'; |
| | | $suffix = '</blockquote><p><br/></p>'; |
| | | } |
| | | } |
| | | |