~ubuntu-branches/ubuntu/trusty/squirrelmail-decode/trusty

« back to all changes in this revision

Viewing changes to eastasia/euc_jp.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2007-06-27 15:44:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070627154449-r2gj3lcucob3c38w
Tags: 1.2-1
New upstream (bugfix) release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 *
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 $
36
36
 * @package decode
37
37
 * @subpackage eastasia
38
38
 */
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
60
 
        if (! $save_html)
61
 
            $string=str_replace(array('&amp;','&quot;','&lt;','&gt;'),array('&','"','<','>'),$string);
62
 
 
 
60
        if (! $save_html) {
 
61
            $string=str_replace(array('&quot;','&lt;','&gt;','&amp;'),array('"','<','>','&'),$string);
 
62
        }
63
63
        $string = recode_string("euc-jp..html",$string);
64
64
 
65
65
        // if string sanitizing is not needed, undo htmlspecialchars applied by recode.
66
 
        if ($save_html)
67
 
            $string=str_replace(array('&amp;','&quot;','&lt;','&gt;'),array('&','"','<','>'),$string);
68
 
 
 
66
        if ($save_html) {
 
67
            $string=str_replace(array('&quot;','&lt;','&gt;','&amp;'),array('"','<','>','&'),$string);
 
68
        }
69
69
        return $string;
70
70
    }
71
71
 
6990
6990
  
6991
6991
  return $ret;
6992
6992
}
6993
 
?>