X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=8f232695cf8c902030d2fd44d52b36373c42141a;hb=ca885a4ff4cc1175af8db97bab02f7aa74ced73a;hp=158d0bcf87b1a0077ad26169780f51862b56fb1f;hpb=7e697748d4feff6f52f95b6dca4dd05b5dbdd861;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index 158d0bcf..8f232695 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -1701,7 +1701,8 @@ function sq_fixstyle($body, $pos, $message, $id, $mailbox){ // "url(\\1$secremoveimg\\2)", $content); // remove NUL $content = str_replace("\0", "", $content); - + // translate ur\l and variations (IE parses that) + $content = preg_replace("/(\\\\)?u(\\\\)?r(\\\\)?l(\\\\)?/i", 'url', $content); // NB I insert NUL characters to keep to avoid an infinite loop. They are removed after the loop. while (preg_match("/url\s*\(\s*[\'\"]?([^:]+):(.*)?[\'\"]?\s*\)/si", $content, $matches)) { $sProto = strtolower($matches[1]); @@ -2164,6 +2165,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links "/behaviou*r/i", "/include-source/i", "/position\s*:\s*absolute/i", + "/(\\\\)?u(\\\\)?r(\\\\)?l(\\\\)?/i", "/url\s*\(\s*([\'\"])\s*\S+script\s*:.*([\'\"])\s*\)/si", "/url\s*\(\s*([\'\"])\s*mocha\s*:.*([\'\"])\s*\)/si", "/url\s*\(\s*([\'\"])\s*about\s*:.*([\'\"])\s*\)/si", @@ -2176,6 +2178,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links "idiocy", "idiocy", "", + "url", "url(\\1#\\1)", "url(\\1#\\1)", "url(\\1#\\1)", @@ -2387,4 +2390,4 @@ function SendDownloadHeaders($type0, $type1, $filename, $force, $filesize=0) { } // end fn SendDownloadHeaders -?> \ No newline at end of file +?>