note 85593 added to function.htmlentities

From: Date: Sun, 07 Sep 2008 20:33:16 +0000
Subject: note 85593 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-144230@lists.php.net to get a copy of this message
Followup to anotheruser at example dot com 02-Aug-2008 02:12 There's a couple of parts in the code which make the post eligible for deletion. The foreach loop can be replaced by array_walk. As halocastle at yahoo dot com mentioned, the key names passed by the user in post/get are suspect as well, but weren't handled in the example. Altering post/get arrays directly is bad form. The example should be used under very specific situations contrary to what I had originally suggested. Also, I'd agree with kjarli at gmail dot com that there are probably better alternatives to htmlentities for scrubbing data for db storage. The function as edited by the moderators is broken. It has no return value or doesn't set the value passed by reference. Passing $txtArray by reference doesn't make sense when used like "$array = htmlizeArray($array);" and it destroys $array as is. Htmlize_text is not a callable function since it was renamed to htmlizeArray in the example. So, Mods - please delete this side thread. ---- Server IP: 209.41.74.194 Probable Submitter: 24.107.184.98 ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- https://master.php.net/note/edit/85593 Del: integrated -- https://master.php.net/note/delete/85593/integrated Del: useless -- https://master.php.net/note/delete/85593/useless Del: bad code -- https://master.php.net/note/delete/85593/bad+code Del: spam -- https://master.php.net/note/delete/85593/spam Del: non-english -- https://master.php.net/note/delete/85593/non-english Del: in docs -- https://master.php.net/note/delete/85593/in+docs Del: other reasons-- https://master.php.net/note/delete/85593 Reject -- https://master.php.net/note/reject/85593 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144230) next »