Bug #8695: Fix broken internal anchors in HTML data in Mozilla
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 08:15:30 +0000 (02:15 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Sep 2010 08:15:30 +0000 (02:15 -0600)
imp/lib/Mime/Viewer/Html.php

index 3384f5e..4b2296a 100644 (file)
@@ -308,6 +308,13 @@ class IMP_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
                         /* We don't include Horde.popup() in IFRAME, so need
                          * to use 'simple' links. */
                         $node->setAttribute('href', IMP::composeLink($node->getAttribute('href'), array(), true));
+                    } elseif ($this->_imptmp['inline'] &&
+                              isset($url['fragment']) &&
+                              empty($url['path']) &&
+                              $GLOBALS['browser']->isBrowser('mozilla')) {
+                        /* See Bug #8695: internal anchors are broken in
+                         * Mozilla. */
+                        $node->removeAttribute('href');
                     } elseif (!$node->hasAttribute('target')) {
                         $node->setAttribute('target', $this->_imptmp['target']);
                     }