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

« back to all changes in this revision

Viewing changes to eastasia/euc_tw.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:
7
7
 *
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 $
11
11
 * @package decode
12
12
 * @subpackage eastasia
13
13
 */
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
31
 
        if (! $save_html)
32
 
            $string=str_replace(array('&amp;','&quot;','&lt;','&gt;'),array('&','"','<','>'),$string);
33
 
 
 
31
        if (! $save_html) {
 
32
            $string=str_replace(array('&quot;','&lt;','&gt;','&amp;'),array('"','<','>','&'),$string);
 
33
        }
34
34
        $string = recode_string("euc-tw..html",$string);
35
35
 
36
36
        // if string sanitizing is not needed, undo htmlspecialchars applied by recode.
37
 
        if ($save_html)
38
 
            $string=str_replace(array('&amp;','&quot;','&lt;','&gt;'),array('&','"','<','>'),$string);
39
 
 
 
37
        if ($save_html) {
 
38
            $string=str_replace(array('&quot;','&lt;','&gt;','&amp;'),array('"','<','>','&'),$string);
 
39
        }
40
40
        return $string;
41
41
    }
42
42
 
61
61
    // pure php decoding is not implemented.
62
62
    return $string;
63
63
}
64
 
?>
 
 
b'\\ No newline at end of file'