From 9546d22c67fda4cbc4a9141dca11944e885ce8a7 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 15 Oct 2012 14:35:56 +0200 Subject: Avoid unnecessary strtoupper() calls but validate target charset if specified --- program/include/rcube_charset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/include/rcube_charset.php b/program/include/rcube_charset.php index 35c69729b..50ddc19f4 100644 --- a/program/include/rcube_charset.php +++ b/program/include/rcube_charset.php @@ -179,7 +179,7 @@ class rcube_charset static $mbstring_sch = null; static $conv = null; - $to = empty($to) ? strtoupper(RCMAIL_CHARSET) : $to; + $to = empty($to) ? RCMAIL_CHARSET : self::parse_charset($to); $from = self::parse_charset($from); // It is a common case when UTF-16 charset is used with US-ASCII content (#1488654) -- cgit v1.2.3