Hi folks,
I am developing a CMS framework and have come across a basic problem that is really frustrating me.
I have a rich text editor in place so the user can upload images, add links, etc.
If the user added a page with an image, the following would be inserted into the DB:
Look at my widgets! <img src="image.jpg">
If the user later wants to edit this, the database puts this into the form for the user to edit - no problem.
However, if the user submits the page with an error (say the title is left empty) the form echos back the updated content with an error message. However, what was:
Look at my widgets! <img src="image.jpg">
Is now:
Look at my widgets! <img src=\"image.jpg\">
And it's breaking the code. I have no idea what this is and it's very frustrating! Could anyone help me please? I would REALLY appreciate it.
I've trimmed my code down to:
$body = $HTTP_POST_VARS['body'];
and it's still doing it...
Help!
Thanks in advance,
Tom.