]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/mail/func.inc
Imported Upstream version 0.7.1
[roundcube.git] / program / steps / mail / func.inc
index 3c93cda1d993acdf1e6c2a9e88726b8223281e98..00c4d084e8af057ad578445691e98b1552a74fab 100644 (file)
@@ -15,7 +15,7 @@
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id: func.inc 5601 2011-12-14 09:08:54Z alec $
+ $Id: func.inc 5715 2012-01-05 10:28:24Z alec $
 
 */
 
@@ -1084,15 +1084,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
  */