note 100699 added to function.htmlentities

From: Date: Mon, 01 Nov 2010 05:34:48 +0000
Subject: note 100699 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-173633@lists.php.net to get a copy of this message
To stop all the characters that would be classified as HTML entities from being injected in the first place, use something like the following: <?php function hasCharacters($string){ if($string != htmlentities($string)){ return false; } else{ return true; } } ?> See my site at http://www.bodeezer.com ---- Server IP: 192.41.42.26 Probable Submitter: 12.188.211.82 ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- https://master.php.net/note/edit/100699 Del: integrated -- https://master.php.net/note/delete/100699/integrated Del: useless -- https://master.php.net/note/delete/100699/useless Del: bad code -- https://master.php.net/note/delete/100699/bad+code Del: spam -- https://master.php.net/note/delete/100699/spam Del: non-english -- https://master.php.net/note/delete/100699/non-english Del: in docs -- https://master.php.net/note/delete/100699/in+docs Del: other reasons-- https://master.php.net/note/delete/100699 Reject -- https://master.php.net/note/reject/100699 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173633) next »