Only deal with base tags when viewing inline
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 04:17:00 +0000 (22:17 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 28 Sep 2009 04:17:00 +0000 (22:17 -0600)
framework/Mime/lib/Horde/Mime/Viewer/Html.php

index 4151c27..2d14177 100644 (file)
@@ -105,7 +105,8 @@ class Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Driver
 
         /* Deal with <base> tags in the HTML, since they will screw up our own
          * relative paths. */
-        if (preg_match('/<base href="?([^"> ]*)"? ?\/?>/i', $data, $matches)) {
+        if (!empty($options['inline']) &&
+            preg_match('/<base href="?([^"> ]*)"? ?\/?>/i', $data, $matches)) {
             $base = $matches[1];
             if (substr($base, -1) != '/') {
                 $base .= '/';