note 109279 added to function.htmlspecialchars

From: Date: Mon, 02 Jul 2012 11:48:52 +0000
Subject: note 109279 added to function.htmlspecialchars
Groups: php.notes 
Request: Send a blank email to php-notes+get-189001@lists.php.net to get a copy of this message
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! ---- Server IP: 195.54.192.44 Probable Submitter: 95.221.36.250 ---- Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php Edit -- https://master.php.net/note/edit/109279 Del: integrated -- https://master.php.net/note/delete/109279/integrated Del: useless -- https://master.php.net/note/delete/109279/useless Del: bad code -- https://master.php.net/note/delete/109279/bad+code Del: spam -- https://master.php.net/note/delete/109279/spam Del: non-english -- https://master.php.net/note/delete/109279/non-english Del: in docs -- https://master.php.net/note/delete/109279/in+docs Del: other reasons-- https://master.php.net/note/delete/109279 Reject -- https://master.php.net/note/reject/109279 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#189001) next »