From dbebf05844c43ae88b9e1de8a7d8102df2df1ec0 Mon Sep 17 00:00:00 2001 From: tokul Date: Mon, 1 Nov 2004 11:02:13 +0000 Subject: [PATCH] more checks in charset name git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8308 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/i18n.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/i18n.php b/functions/i18n.php index 3528c1cf..f43fb909 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -200,8 +200,10 @@ function charset_convert($in_charset,$string,$out_charset,$htmlencode=true) { * @return string $charset Adjusted name of charset */ function fixcharset($charset) { - // minus removed from function names - $charset=str_replace('-','_',$charset); + /* remove minus and characters that might be used in paths from charset + * name in order to be able to use it in function names and include calls. + */ + $charset=preg_replace("/[-:.\/\\\]/",'_',$charset); // windows-125x and cp125x charsets $charset=str_replace('windows_','cp',$charset); -- 2.25.1