From: Michael M Slusarz Date: Tue, 10 Mar 2009 22:30:47 +0000 (-0600) Subject: Bug #8062: Fix link parsing X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=07d1333648750a0173727939655e4543727c37c3;p=horde.git Bug #8062: Fix link parsing We need to make sure there is a space before target/href or else params contained in a URL can confuse the regexp if named target or href. --- diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php index 69000c64a..bb0801d17 100644 --- a/imp/lib/Mime/Viewer/Html.php +++ b/imp/lib/Mime/Viewer/Html.php @@ -170,11 +170,11 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html * mailto: links, links that have an "#xyz" anchor and ignore * all links that already have a target. */ $data = preg_replace( - array('/]*\s*href=["\']?(#|mailto:))/i', - '/]*)\s*target=["\']?[^>"\'\s]*["\']?/i', + array('/]*\s+href=["\']?(#|mailto:))/i', + '/]*)\s+target=["\']?[^>"\'\s]*["\']?/i', '/]*\s*href=["\']?(#|mailto:))/i', - '/]*)\s*target=["\']?[^>"\'\s]*["\']?/i', + '/]*\s+href=["\']?(#|mailto:))/i', + '/]*)\s+target=["\']?[^>"\'\s]*["\']?/i', '/