8
8
* @copyright (c) 2005 The SquirrelMail Project Team
9
9
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
10
* @version $Id: euc_tw.php,v 1.3 2005/11/17 21:10:27 tokul Exp $
10
* @version $Id: euc_tw.php 12467 2007-06-25 15:52:44Z kink $
12
12
* @subpackage eastasia
28
28
// this is CPU intensive task. Use recode functions if they are available.
29
29
if (function_exists('recode_string')) {
30
30
// if string is already sanitized, undo htmlspecial chars
32
$string=str_replace(array('&','"','<','>'),array('&','"','<','>'),$string);
32
$string=str_replace(array('"','<','>','&'),array('"','<','>','&'),$string);
34
34
$string = recode_string("euc-tw..html",$string);
36
36
// if string sanitizing is not needed, undo htmlspecialchars applied by recode.
38
$string=str_replace(array('&','"','<','>'),array('&','"','<','>'),$string);
38
$string=str_replace(array('"','<','>','&'),array('"','<','>','&'),$string);