Quote:
Originally Posted by Jakez
Here we go
json_encode(nl2br(str_replace("'","& #39;",$_POST['text_dump'])))
I just wanted to be able to send an FLV dump of text via ajax and I had to go through all this crap lol.
|
You shouldn't have to worry about that - that's an horrendous way to 'escape' text.
Your server doesn't have magic_quote or some abomination on does it ?
If you're looking to secure text for a database insert, mysql_real_escape_string()