summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-30 12:33:42 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-30 12:33:42 +0200
commit9cc5a522df25d7f98e578dc483e0ff067b6c1ded (patch)
tree1d469d94d86833909a1b19c1083b10937ff54084 /program
parentfec4f240e52dcfe4776e39a16e3a83aedd8f24f5 (diff)
Fix so rcube_text2html class does not depend on rcmail_string_replacer
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_text2html.php4
-rw-r--r--program/steps/mail/func.inc2
2 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_text2html.php b/program/lib/Roundcube/rcube_text2html.php
index 46c2b7e9a..0afc6d110 100644
--- a/program/lib/Roundcube/rcube_text2html.php
+++ b/program/lib/Roundcube/rcube_text2html.php
@@ -57,6 +57,8 @@ class rcube_text2html
'end' => '</div>',
// enables links replacement
'links' => true,
+ // string replacer class
+ 'replacer' => 'rcube_string_replacer',
);
@@ -141,7 +143,7 @@ class rcube_text2html
{
// 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;
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 41fe28e7a..a7c483bba 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -920,7 +920,7 @@ function rcmail_print_body($part, $p = array())
*/
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();