note 109279 deleted from function.htmlspecialchars by tularis
| From: | tularis@php.net | Date: | Mon, 02 Jul 2012 15:21:00 +0000 |
| Subject: | note 109279 deleted from function.htmlspecialchars by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189007@lists.php.net to get a copy of this message | ||
Note Submitter: maxim at inbox dot ru
----
I have took "umlaute" function from that page, and apply some basic optimization, but my
benc clocks gave me VERY strange results, i wont publish em ,also need to go. Rebuild about 80+% of
code:
<?php
function htmlesc($txt){
$ret="";$l=strlen($txt);
for (;++$i<$l;){
$teil=hexdec(rawurlencode(substr($txt, $i, 1)));
$teil<32||$teil>1114111?$ret.=substr($txt, $i,
1):$ret.="&#".$teil.";";
$l=strlen($txt);}
return $ret;}
?>
PS HOPE it helps someone cya!