I'm using a Rich Text Editor (RTE) in a form. I send the HTML to another page for user verification with a back button and a submit button.
As an example, let's say I have the following in my RTE field:
First line of text here.
Second line of text here.
The above text will be passed to the verification page as:
<P>First line of text here.</P>
<P>Second line of text here.</P>
This is all good, but if I want to pass the HTML back to the form and edit it, I get an "Unterminated String Constant" error and the RTE field won't display. Now, I think this is happening because the HTML being passed back into the RTE is not all on one line.
So what I want (if possible) is to pass back:
<P>First line of text here.</P><P>Second line of text here.</P>
instead of:
<P>First line of text here.</P>
<P>Second line of text here.</P>
I'm not sure how to rectify this. I've tried replacing CHR(13), but that hasn't helped. I'm not sure if there is some invisible character there and how I would find out what it is. Outputting the variable, view source and copying and pasting into another text editor won't show me anything. But it was worth a shot.
I have no problems passing the HTML around to other pages or saving it to a SQL database. It's just when I have to send the HTML back to the editor with paragraph or list tags that I encounter this problem.
Bookmarks