From e60a299a50bf777919bc8668c96cadd8be455728 Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Wed, 12 Nov 2003 14:57:12 +0000 Subject: [PATCH 1/1] Fix missing mailbox argument to sq_cid2http() in sq_fixstyle() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6155 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 3bdf018d..1b48a431 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -1410,9 +1410,10 @@ function sq_fixatts($tagname, * @param $message the message object * @param $id the message id * @param $content a string with whatever is between + * @param $mailbox the message mailbox * @return a string with edited content. */ -function sq_fixstyle($body, $pos, $message, $id){ +function sq_fixstyle($body, $pos, $message, $id, $mailbox){ global $view_unsafe_images; $me = 'sq_fixstyle'; $ret = sq_findnxreg($body, $pos, ''); @@ -1449,7 +1450,7 @@ function sq_fixstyle($body, $pos, $message, $id){ while (preg_match("|url\s*\(\s*([\'\"]\s*cid:.*?[\'\"])\s*\)|si", $content, $matches)){ $cidurl = $matches{1}; - $httpurl = sq_cid2http($message, $id, $cidurl); + $httpurl = sq_cid2http($message, $id, $cidurl, $mailbox); $content = preg_replace("|url\s*\(\s*$cidurl\s*\)|si", "url($httpurl)", $content); } @@ -1474,6 +1475,7 @@ function sq_fixstyle($body, $pos, $message, $id){ * @param $message the message object * @param $id the message id * @param $cidurl the cid: url. + * @param $mailbox the message mailbox * @return a string with a http-friendly url */ function sq_cid2http($message, $id, $cidurl, $mailbox){ @@ -1611,7 +1613,7 @@ function sq_sanitize($body, */ if ($tagname == "style" && $tagtype == 1){ list($free_content, $curpos) = - sq_fixstyle($body, $gt+1, $message, $id); + sq_fixstyle($body, $gt+1, $message, $id, $mailbox); if ($free_content != FALSE){ $trusted .= sq_tagprint($tagname, $attary, $tagtype); $trusted .= $free_content; -- 2.25.1