View Full Version : Weird issue with html characters and quotes...

07-13-2007, 01:46 PM
On my CMS (Content Management System), There are two textareas submitted before the information is actually replaced for that page. The issue starts after the first textarea is submitted (to the second one). Say, they put:

<a href="something.html">Next&gt;&gt;&gt;</a>

They hit submit, and the confirmation page shows:

<a href=\"something.html\">Next>>></a>

Why does it add the backslashes to the quotes and parse the html entities??? This is going to confuse my clients, and it's annoying having those backslashes in the code, anyway. Especially because if you don't take them out and edit the information, another backslash is added! So then there's 2 in front of each quote...

I know there's PHP functions that deal with html and stuff - any ideas?

07-13-2007, 02:54 PM
Hey, I fixed it. Used a combination of htmlentities(), html_entity_decode(), and stripslashes().