undo htmlspecial
| From: | Nicholas | Date: | Mon, 21 May 2001 02:08:51 +0000 |
| Subject: | undo htmlspecial | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53652@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: MD5
someone was looking for an undo htmlspecial chars well i found a
snipet on sourcefourge i forgot who sent the mail so here you go who
ever you are..
function unconvert_htmlspecialchars($string)
{
if( strlen($string) < 4 )
{
return $string;
}
else
{
$string=str_replace(' ', ' ', $string);
$string=str_replace('"', '"', $string);
$string=str_replace('>', '>', $string);
$string=str_replace('<', '<', $string);
$string=str_replace('&', '&', $string);
return $string;
}
}
- --
Best regards,
Nicholas mailto:TheUnforgiven@mediaone.net
-----BEGIN PGP SIGNATURE-----
Version: 2.6
iQCVAwUAOwh4trovzXm8USdPAQFHCwQAq4xR+xFzDesNaEbyh9yXi6pZvLUFD/ef
Rb5OfkXr6qj84JSzAdQpDFKVDxabQ0rLY0SdMJqgkwc6Er+TdfyZ49tP3UhUK1it
fBC3HtIJspugG9ld0yF7vgNkWoDwtfiPPcN63y6Nb3xWmL1HVSNVf3cHnbFrNtAg
UNmJ6Gz/oTQ=
=XOxm
-----END PGP SIGNATURE-----