33
33
* @copyright (c) 2004-2005 The SquirrelMail Project Team
34
34
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
35
* @version $Id: euc_jp.php,v 1.10 2005/11/17 21:10:27 tokul Exp $
35
* @version $Id: euc_jp.php 12467 2007-06-25 15:52:44Z kink $
37
37
* @subpackage eastasia
57
57
// this is CPU intensive task. Use recode functions if they are available.
58
58
if (function_exists('recode_string')) {
59
59
// if string is already sanitized, undo htmlspecial chars
61
$string=str_replace(array('&','"','<','>'),array('&','"','<','>'),$string);
61
$string=str_replace(array('"','<','>','&'),array('"','<','>','&'),$string);
63
63
$string = recode_string("euc-jp..html",$string);
65
65
// if string sanitizing is not needed, undo htmlspecialchars applied by recode.
67
$string=str_replace(array('&','"','<','>'),array('&','"','<','>'),$string);
67
$string=str_replace(array('"','<','>','&'),array('"','<','>','&'),$string);