* sync matches and replacement arrays again in magicHtml()
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 3 Aug 2005 17:58:30 +0000 (17:58 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 3 Aug 2005 17:58:30 +0000 (17:58 +0000)
* fix for regular expression that should catch
url(http://domain.tld/location)

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9894 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 7e0770077444a8f68acbd587966dacdc9641d467..a7e6cbf30ecaa4e68037fac0de4b0ea8c9b6dc37 100644 (file)
@@ -2109,7 +2109,6 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links
                         "\\1$secremoveimg\\2",
                         "\\1$secremoveimg\\2",
                         "\\1$secremoveimg\\2",
-                        "\\1$secremoveimg\\2"
                         )
                     ),
                 "/^href|action/i" =>
@@ -2120,7 +2119,6 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links
                         "/^([\'\"])\s*about\s*:.*([\'\"])/si"
                         ),
                     Array(
-                        "\\1#\\1",
                         "\\1#\\1",
                         "\\1#\\1",
                         "\\1#\\1"
@@ -2148,8 +2146,6 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links
                     "url(\\1#\\1)",
                     "url(\\1#\\1)",
                     "url(\\1#\\1)",
-                    "url(\\1#\\1)",
-                    "url(\\1#\\1)",
                     "\\1:url(\\2#\\3)"
                     )
                 )
@@ -2168,7 +2164,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links
         array_push($bad_attvals{'/.*/'}{'/^src|background/i'}[1],
                 "\\1$secremoveimg\\1");
         array_push($bad_attvals{'/.*/'}{'/^style/i'}[0],
-                '/url\(([\'\"])\s*https*:.*([\'\"])\)/si');
+                '/url\([\'\"]?https?:[^\)]*[\'\"]?\)/si');
         array_push($bad_attvals{'/.*/'}{'/^style/i'}[1],
                 "url(\\1$secremoveimg\\1)");
     }