summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-01-05 09:51:41 +0000
committeralecpl <alec@alec.pl>2012-01-05 09:51:41 +0000
commitf5d62f7157a629d8d1611d848be6e4167dd17075 (patch)
tree8599384d352947c658ec75e5449369f9070473e2 /program/steps
parent48be8f6428ba3be7375b84aea2b73d1c67de6da1 (diff)
- Fix bug in handling of base href and inline content (#1488290)
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 3784456c7..f791f7033 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1110,15 +1110,13 @@ function rcmail_resolve_base($body)
// check for <base href=...>
if (preg_match('!(<base.*href=["\']?)([hftps]{3,5}://[a-z0-9/.%-]+)!i', $body, $regs)) {
$replacer = new rcube_base_replacer($regs[2]);
-
- // replace all relative paths
- $body = preg_replace_callback('/(src|background|href)=(["\']?)([^"\'\s]+)(\2|\s|>)/Ui', array($replacer, 'callback'), $body);
- $body = preg_replace_callback('/(url\s*\()(["\']?)([^"\'\)\s]+)(\2)\)/Ui', array($replacer, 'callback'), $body);
+ $body = $replacer->replace($body);
}
return $body;
}
+
/**
* modify a HTML message that it can be displayed inside a HTML page
*/