Hi, this is graf25, and I'm an idiot. :)
authorgraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 Jun 2002 17:20:43 +0000 (17:20 +0000)
committergraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 18 Jun 2002 17:20:43 +0000 (17:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2967 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index aa321aaa42e34e9a81cdb8594a650a9e3c47625c..33b829c40218473d2f66e336cd95090333031e7a 100644 (file)
@@ -2095,30 +2095,14 @@ function magicHTML($body, $id, $message){
          * Remove any references to http/https if view_unsafe_images set
          * to false.
          */
-        $addendum = Array(
-          "/.*/" =>
-            Array(
-                "/^src|background/i" =>
-                    Array(
-                          Array(
-                                "/^([\'\"])\s*https*:.*([\'\"])/si"
-                                ),
-                          Array(
-                                "\\1$secremoveimg\\2"
-                                )
-                        ),
-                "/^style/si" =>
-                    Array(
-                          Array(
-                                "/url\(([\'\"])\s*https*:.*([\'\"])\)/si"
-                               ),
-                          Array(
-                                "url(\\1$secremoveimg\\2)"
-                               )
-                          )
-                )
-          );
-        $bad_attvals = array_merge($bad_attvals, $addendum);
+         array_push($bad_attvals{'/.*/'}{'/^src|background|href|action/i'}[0],
+                    '/^([\'\"])\s*https*:.*([\'\"])/si');
+         array_push($bad_attvals{'/.*/'}{'/^src|background|href|action/i'}[1],
+                    "\\1$secremoveimg\\2");
+         array_push($bad_attvals{'/.*/'}{'/^style/si'}[0],
+                    '/url\(([\'\"])\s*https*:.*([\'\"])\)/si');
+         array_push($bad_attvals{'/.*/'}{'/^style/si'}[1],
+                    "url(\\1$secremoveimg\\2)");
     }
 
     $add_attr_to_tag = Array(