note 26338 added to function.htmlentities
| From: | ressler at usma dot edu | Date: | Sun, 27 Oct 2002 05:07:27 +0000 |
| Subject: | note 26338 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38613@lists.php.net to get a copy of this message | ||
This function is for more than protecting special characters in value tags! Any time you are
displaying text that was provided earlier by a user, you need this function. For instance, if a
fun-loving user provides the text:
<script>for(;;) alert('Gotcha!')</script>
then future displays of it lock up the browser of the requestor. The < > must be converted to
< and >!
--
http://www.php.net/manual/en/function.htmlentities.php
http://master.php.net/manage/user-notes.php?action=edit+26338
http://master.php.net/manage/user-notes.php?action=delete+26338
http://master.php.net/manage/user-notes.php?action=reject+26338