Re: [SMARTY-DEV] Re: Request: add |escape:"decentity"

From: Date: Fri, 02 Apr 2004 13:23:22 +0000
Subject: Re: [SMARTY-DEV] Re: Request: add |escape:"decentity"
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2261@lists.php.net to get a copy of this message
Submit your changes in diff format, makes the life of messju, monte, and well, everybdoy a lot easier. Anyway, here's the patch for this piece of code Regards, Ruben On Fri, 2004-04-02 at 14:37, Konstantin A. Pelepelin wrote: > > 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 -- # ------------------------------ # # Ruben Vermeersch # # E-mail: ruben@Lambda1.be # # Website: http://www.Lambda1.be # # Mobile: +32495338869 # # ------------------------------ #

Attachment: [text/x-patch] escape_modifier.patch
« previous php.smarty.dev (#2261) next »