note 70850 added to function.htmlentities

From: Date: Wed, 01 Nov 2006 01:33:04 +0000
Subject: note 70850 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-119278@lists.php.net to get a copy of this message
/* replaces everything but alphanumeric tab newline carriage return */ function allhtmlentities($string,$decode_first=true) { // this is to ensure that any entities already coded are not "messed up" if($decode_first) $string = html_entity_decode($string); // "encode" return preg_replace( '/([^\x09\x0A\x0D\x20-\x7F]|[\x21-\x2F]|[\x3A-\x40]|[\x5B-\x60])/e' , '"&#".ord("$0").";"', $string); } ---- Server IP: 216.194.113.175 Probable Submitter: 71.32.135.49 ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- https://master.php.net/note/edit/70850 Del: integrated -- https://master.php.net/note/delete/70850/integrated Del: useless -- https://master.php.net/note/delete/70850/useless Del: bad code -- https://master.php.net/note/delete/70850/bad+code Del: spam -- https://master.php.net/note/delete/70850/spam Del: non-english -- https://master.php.net/note/delete/70850/non-english Del: in docs -- https://master.php.net/note/delete/70850/in+docs Del: other reasons-- https://master.php.net/note/delete/70850 Reject -- https://master.php.net/note/reject/70850 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119278) next »