Re: Request: add |escape:"decentity"

From: Date: Fri, 02 Apr 2004 12:37:18 +0000
Subject: Re: Request: add |escape:"decentity"
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2260@lists.php.net to get a copy of this message
Hi! As I've found today, IE4 doesn't understand hexadecimal entities (&#x40;), but understands decimal (&#64;). I understand, most of people don't care about IE4 these days, but anyway it's not difficult. Code to insert into smarty_modifier_escape case 'decentity': $return = ''; for ($x=0; $x < strlen($string); $x++) { $return .= '&#' . ord($string[$x]) . ';'; } return $return;
And similar change should be made to function.mailto.php replace $text_encode .= '&#x' . bin2hex($text[$x]).';'; with $text_encode .= '&#' . ord($text[$x]).';'; WBR, Konstantin A. Pelepelin

« previous php.smarty.dev (#2260) next »