From: pdontthink Date: Sun, 13 Mar 2005 01:33:19 +0000 (+0000) Subject: Allow plugins to customize attachment link (for instance, use image instead of text... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ebeb83485874b392368d359cefc6e08fcb14f559;p=squirrelmail.git Allow plugins to customize attachment link (for instance, use image instead of text). Also, parse URIs out of HTML messages too (originally, the call was to remove mailto: links, but it made sense to simply use parseUrl(); if ppl don't like it, we can work it out. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8997 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mime.php b/functions/mime.php index 014ee0d1..c13a3668 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -516,7 +516,7 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { } else { $attachments .= '  |  '; } - $attachments .= '' . $val['text'] . ''; + $attachments .= '' . (isset($val['text']) && !empty($val['text']) ? $val['text'] : '') . (isset($val['extra']) && !empty($val['extra']) ? $val['extra'] : '') . ''; } unset($links); $attachments .= "\n"; @@ -1993,6 +1993,11 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX') { if (preg_match("|$secremoveimg|i", $trusted)){ $has_unsafe_images = true; } + + + // we want to parse mailto's and other URLs in HTML output too + parseUrl($trusted); + return $trusted; }