From 5c72a1a95ac53a826d79516138c3ee6f772a4b5e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 7 Sep 2010 02:15:30 -0600 Subject: [PATCH] Bug #8695: Fix broken internal anchors in HTML data in Mozilla --- imp/lib/Mime/Viewer/Html.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php index 3384f5ea2..4b2296a61 100644 --- a/imp/lib/Mime/Viewer/Html.php +++ b/imp/lib/Mime/Viewer/Html.php @@ -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']); } -- 2.11.0