note 51452 added to function.htmlentities

From: Date: Thu, 31 Mar 2005 04:54:29 +0000
Subject: note 51452 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-87232@lists.php.net to get a copy of this message
Bob Dole, Sure, your pattern is smaller and will work, but it's not technically valid. An HTML tag cannot contain any character as your pattern states -- only a small subset of the possible characters -- your pattern would allow such tags as: <~!%*#%> or <&&&&&&> and would cause the function to leave the ampersands un-encoded in the second example above, causing an XHTML document to break. ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51452 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51452&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51452&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51452&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51452&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51452&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51452&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87232) next »