*
* This file provides the handling of often-used attachment types.
*
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2019 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
$Args[0]['attachment_common']['href'] = Where it links to */
sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
- // if htmlspecialchars() breaks something - find other way to encode & in url.
+ // if sm_encode_html_special_chars() breaks something - find other way to encode & in url.
$Args[0]['attachment_common']['href'] = $base_uri . 'src/view_text.php?'. $QUERY_STRING;
$Args[0]['attachment_common']['href'] =
set_url_var($Args[0]['attachment_common']['href'],
$Ext = '';
if (is_array($Regs) && isset($Regs[1])) {
- $Ext = $Regs[1];
+ $Ext = $Regs[1];
+ $Ext = strtolower($Regs[1]);
}
- $Ext = strtolower($Regs[1]);
-
if ($Ext == '' || ! isset($FileExtensionToMimeType[$Ext]))
return;