note 13658 added to function.htmlspecialchars.php
| From: | je4d at hotmail dot com | Date: | Wed, 27 Jun 2001 18:44:04 +0000 |
| Subject: | note 13658 added to function.htmlspecialchars.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14704@lists.php.net to get a copy of this message | ||
Just for the other lazy ppl out there - heres a reverse function:
$text=ereg_replace('>', '>', $text);
$text=ereg_replace('<', '<', $text);
$text=ereg_replace('"', "\"", $text);
$text=ereg_replace('&', '&', $text);
OR:
$plaintext=ereg_replace('&', '&',
ereg_replace('"', "\"", ereg_replace('<',
'<', ereg_replace('>', '>', $htmltext))));
http://www.php.net/manual/en/function.htmlspecialchars.php