Aleksander Machniak
2014-08-30 9cc5a522df25d7f98e578dc483e0ff067b6c1ded
Fix so rcube_text2html class does not depend on rcmail_string_replacer
2 files modified
6 ■■■■■ changed files
program/lib/Roundcube/rcube_text2html.php 4 ●●● patch | view | raw | blame | history
program/steps/mail/func.inc 2 ●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_text2html.php
@@ -57,6 +57,8 @@
        'end'    => '</div>',
        // enables links replacement
        'links'  => true,
        // string replacer class
        'replacer' => 'rcube_string_replacer',
    );
@@ -141,7 +143,7 @@
    {
        // make links and email-addresses clickable
        $attribs  = array('link_attribs' => array('rel' => 'noreferrer', 'target' => '_blank'));
        $replacer = new rcmail_string_replacer($attribs);
        $replacer = new $this->config['replacer']($attribs);
        if ($this->config['flowed']) {
            $flowed_char = 0x01;
program/steps/mail/func.inc
@@ -920,7 +920,7 @@
 */
function rcmail_plain_body($body, $flowed = false)
{
    $options   = array('flowed' => $flowed, 'wrap' => !$flowed);
    $options   = array('flowed' => $flowed, 'wrap' => !$flowed, 'replacer' => 'rcmail_string_replacer');
    $text2html = new rcube_text2html($body, false, $options);
    $body      = $text2html->get_html();