htmlspecialchars and htmlentities not working?!
Posted: Thu May 17, 2007 3:26 pm
Using a form to post this string: aaa "bbb" ccc 'ddd' eee
This code:
returns After htmlentities, postmsg='aaa "bbb" ccc 'ddd' eee'.
I get the exact same results with htmlspecialchars. Any suggestions?
This code:
Code: Select all
$postmsg=$_POST['postmsg'];
echo $bdo."Before htmlentities, postmsg='$postmsg'.".$edo;
$postmsg=htmlentities($postmsg, ENT_QUOTES);
echo $bdo."After htmlentities, postmsg='$postmsg'.".$edo;I get the exact same results with htmlspecialchars. Any suggestions?