git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8308
7612ce4b-ef26-0410-bec9-
ea0150e637f0
* @return string $charset Adjusted name of charset
*/
function fixcharset($charset) {
* @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);
// windows-125x and cp125x charsets
$charset=str_replace('windows_','cp',$charset);