Re: Request: add |escape:"decentity"

"Konstantin A. Pelepelin" <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Organization DTF
Message-ID <[email protected]>
> 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

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.