X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=989018ae08263043e02a707c5df5b6826d105269;hb=eac8f9425e93278c8e3a0488d7c45443d4124d01;hp=6541820e4f17e7a95388414692b2128663f45355;hpb=1814c39b2c67433775174accce117c9fe550ea31;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index 6541820e..989018ae 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -332,12 +332,24 @@ function translateText(&$body, $wrap_at, $charset) { } /** -* This returns a parsed string called $body. That string can then -* be displayed as the actual message in the HTML. It contains -* everything needed, including HTML Tags, Attachments at the -* bottom, etc. -* @param clean Do not output stuff that's irrelevant for the printable version. -*/ + * This returns a parsed string called $body. That string can then + * be displayed as the actual message in the HTML. It contains + * everything needed, including HTML Tags, Attachments at the + * bottom, etc. + * + * Since 1.2.0 function uses message_body hook. + * Till 1.3.0 function included output of formatAttachments(). + * + * @param resource $imap_stream imap connection resource + * @param object $message squirrelmail message object + * @param array $color squirrelmail color theme array + * @param integer $wrap_at number of characters per line + * @param string $ent_num (since 1.3.0) message part id + * @param integer $id (since 1.3.0) message id + * @param string $mailbox (since 1.3.0) imap folder name + * @param boolean $clean (since 1.5.1) Do not output stuff that's irrelevant for the printable version. + * @return string html formated message text + */ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $mailbox='INBOX', $clean=FALSE) { /* This if statement checks for the entity to show as the * primary message. To add more of them, just put them in the @@ -426,7 +438,22 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma return $body; } - +/** + * Displays attachment links and information + * FIXME: SM_PATH is used in URLs + * + * Since 1.3.0 function is not included in formatBody() call. + * + * Since 1.0.2 uses attachment $type0/$type1 hook. + * Since 1.2.5 uses attachment $type0/* hook. + * Since 1.5.0 uses attachments_bottom hook. + * + * @param object $message SquirrelMail message object + * @param array $exclude_id message parts that are not attachments. + * @param string $mailbox mailbox name + * @param integer $id message id + * @return string html formated attachment information. + */ function formatAttachments($message, $exclude_id, $mailbox, $id) { global $where, $what, $startMessage, $color, $passed_ent_id; @@ -1944,6 +1971,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links "/binding/i", "/behaviou*r/i", "/include-source/i", + "/position\s*:\s*absolute/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", @@ -1954,6 +1982,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX', $take_mailto_links "idiocy", "idiocy", "idiocy", + "", "url(\\1#\\1)", "url(\\1#\\1)", "url(\\1#\\1)", @@ -2168,4 +2197,4 @@ function SendDownloadHeaders($type0, $type1, $filename, $force, $filesize=0) { } // end fn SendDownloadHeaders -?> +?> \ No newline at end of file