Re: [SMARTY-DEV] Request: add |escape:"decentity"
| From: | messju mohr | Date: | Thu, 15 Apr 2004 10:01:55 +0000 |
| Subject: | Re: [SMARTY-DEV] Request: add |escape:"decentity" | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2287@lists.php.net to get a copy of this message | ||
On Fri, Apr 02, 2004 at 04:12:25PM +0400, Konstantin A. Pelepelin wrote:
> 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;
not that i really care much about IE4, but I think this is a useful
addition to "escape". I'll add and commit it, if nobody else objects
another piece of "bloat" in the smarty distribution. :)
greetings
messju
> WBR,
> Konstantin A. Pelepelin