* @param $message the message object
* @param $id the message id
* @param $content a string with whatever is between <style> and </style>
+ * @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, '</\s*style\s*>');
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);
}
* @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){
*/
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;