From 9fcdba88dd23b8980d634b5d39d4af9499041235 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 7 Jul 2009 15:57:30 -0600 Subject: [PATCH] Bug #8413: Fix regex to capture some malformed img tags --- imp/lib/Mime/Viewer/Html.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php index 9fe00cafa..62313f0cd 100644 --- a/imp/lib/Mime/Viewer/Html.php +++ b/imp/lib/Mime/Viewer/Html.php @@ -32,13 +32,13 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html # match 1 ( # tags - ]+src= + ]+?src= # tags - |]*src= + |]+?src= # "background" attributes - |]*background=|]*background=|]*background= + |]+?background=|]*background=|]*background= # "style" attributes; match 2; quotes: match 3 - |(style=\s*("|\')?[^>]*background(?:-image)?:(?(3)[^"\']|[^>])*?url\s*\() + |(style=\s*("|\')?[^>]*?background(?:-image)?:(?(3)[^"\']|[^>])*?url\s*\() ) # whitespace \s* @@ -57,7 +57,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html (?(2) # closing parenthesis \s*\) - # remainder of the "style" attribute; match 5 + # remainder of the "style" attribute; match 6 ((?(3)[^"\'>]*|[^\s>]*)) ) /isx'; -- 2.11.0