From 0c4d78aa1167ec9a61f6a23f824f6b6f9843ecca Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 15 May 2019 10:09:57 +0200 Subject: [PATCH] Remove language code from charset name as per the RFC2231.5 --- program/lib/Roundcube/rcube_charset.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_charset.php b/program/lib/Roundcube/rcube_charset.php index b106965e2..5ecddec17 100644 --- a/program/lib/Roundcube/rcube_charset.php +++ b/program/lib/Roundcube/rcube_charset.php @@ -185,8 +185,8 @@ class rcube_charset } /** - * Parse and validate charset name string (see #1485758). - * Sometimes charset string is malformed, there are also charset aliases + * Parse and validate charset name string. + * Sometimes charset string is malformed, there are also charset aliases, * but we need strict names for charset conversion (specially utf8 class) * * @param string $input Input charset name @@ -207,6 +207,7 @@ class rcube_charset '/\$.*$/', // e.g. _ISO-8859-JP$SIO '/UNICODE-1-1-*/', // RFC1641/1642 '/^X-/', // X- prefix (e.g. X-ROMAN8 => ROMAN8) + '/\*.*$/' // lang code according to RFC 2231.5 ), '', $charset); if ($charset == 'BINARY') {