note 45989 added to function.htmlspecialchars
| From: | donwilson at gmail dot com | Date: | Sat, 25 Sep 2004 16:58:39 +0000 |
| Subject: | note 45989 added to function.htmlspecialchars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77311@lists.php.net to get a copy of this message | ||
To reverse the action of htmlspecialchars(), use this code:
<?php
unhtmlspecialchars( $string )
{
$string = str_replace ( '&', '&', $string );
$string = str_replace ( ''', '\'', $string );
$string = str_replace ( '"', '\"', $string );
$string = str_replace ( '<', '<', $string );
$string = str_replace ( '>', '>', $string );
return $string;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45989
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45989&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45989&report=yes
Search -- http://master.php.net/manage/user-notes.php