note 42084 added to function.strip-tags
| From: | djnoz at animesource dot co dot uk | Date: | Mon, 03 May 2004 06:41:24 +0000 |
| Subject: | note 42084 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69125@lists.php.net to get a copy of this message | ||
This simple function "neuters" tags so that they can be displayed as text in the browser.
function dehtml(&$txt)
{
// nullifies user entering special html characters
$txt = str_replace('&', '&', $txt);
// nullifies tags
$txt = str_replace(array('<', '>'), array('<',
'>'), $txt);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42084
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42084&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42084&report=yes
Search -- http://master.php.net/manage/user-notes.php