git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2967
7612ce4b-ef26-0410-bec9-
ea0150e637f0
* Remove any references to http/https if view_unsafe_images set
* to false.
*/
* 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(
}
$add_attr_to_tag = Array(