Hello,
I am using FCKEditor for some form fields on a webpage. It works very well, except in one instance.
When I submit the form, it submits to a preview version of the same page. If I hit the browser back button, the html formatted text in the FCKEditor TextBox becomes htmlencoded
So
Title ul:
i
3
jk
shows as <p><strong>Title ul:</strong></p> <ol> <li><strong>i</strong></li> <li>3</li> <li>jk</li> </ol> <p> </p>
and the source code in the Editor becomes <p><p><strong>Title ul:</strong></p> <ol> <li><strong>i</strong></li> <li>3</li> <li>jk</li> </ol> <p>&nbsp;</p></p>
In fckconfig.js I have set FCKConfig.HtmlEncodeOutput = false ;
If I submit the original code to the database without using the browser back button, it works properly. (This is an internal tool, so I don't neeed to worry about ValidateRequest="true" )
I am thinking that the text is getting encoded in the viewstate. If I add
protected void Page_Load(object sender, EventArgs e){
Project_Requirements.Value = HtmlDecode(Project_Requirements.Value);
}
then I go to the Preview page and hit the browser back button, then reload the page, it gives me back my html formatted text. But that is a bad user experience.
Has anyone run into this? Is there a fix?
Thanks,
I am using FCKEditor for some form fields on a webpage. It works very well, except in one instance.
When I submit the form, it submits to a preview version of the same page. If I hit the browser back button, the html formatted text in the FCKEditor TextBox becomes htmlencoded
So
Title ul:
i
3
jk
shows as <p><strong>Title ul:</strong></p> <ol> <li><strong>i</strong></li> <li>3</li> <li>jk</li> </ol> <p> </p>
and the source code in the Editor becomes <p><p><strong>Title ul:</strong></p> <ol> <li><strong>i</strong></li> <li>3</li> <li>jk</li> </ol> <p>&nbsp;</p></p>
In fckconfig.js I have set FCKConfig.HtmlEncodeOutput = false ;
If I submit the original code to the database without using the browser back button, it works properly. (This is an internal tool, so I don't neeed to worry about ValidateRequest="true" )
I am thinking that the text is getting encoded in the viewstate. If I add
protected void Page_Load(object sender, EventArgs e){
Project_Requirements.Value = HtmlDecode(Project_Requirements.Value);
}
then I go to the Preview page and hit the browser back button, then reload the page, it gives me back my html formatted text. But that is a bad user experience.
Has anyone run into this? Is there a fix?
Thanks,
Re: Viewstate from FCKEditor in ASP.NET C#
I have a page in .net that has multiple views on it. If I navigate through the views with the buttons on the page it works fine but if I use the browser back button it displays the text with html codes in it.
Has anyone found a fix for this? Has an error ticket been raised for this?