Request: add |escape:"decentity"
| From: | Konstantin A. Pelepelin | Date: | Fri, 02 Apr 2004 12:12:25 +0000 |
| Subject: | Request: add |escape:"decentity" | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-2258@lists.php.net to get a copy of this message | ||
Hi!
As I've found today, IE4 doesn't understand hexadecimal entities (@), but understands decimal (@).
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;
WBR,
Konstantin A. Pelepelin