Log in or register to post comments
Last post
A potentially dangerous Request.Form
Hi

I am currently trying to configure FCK editor for my site and every time I submit something I get the below error:

A potentially dangerous Request.Form value was detected from the client (FCKeditor1="<STRONG>This is &#351; ju...").

I take it that this is due to the content being paramaterised by asp.net. It does not liek the HTML tags, I was wondering does anybody know of a way of getting round this?

Many thanks in advance
RE: A potentially dangerous Request.Form
in Web.config, add

<code>
&lt;configuration&gt;
...
&lt;system.web&gt;
&lt;pages validateRequest="false" /&gt;
...
&lt;/system.web&gt;
...
&lt;/configuration&gt;
</code>

Have a nice day!
RE: A potentially dangerous Request.Form
oops~ i'm new here

<configuration>
...
<system.web>
<pages validateRequest="false" />
...
</system.web>
...
</configuration>
RE: A potentially dangerous Request.Form
thank you very much.
RE: A potentially dangerous Request.Form
Or, you can really solve the problem.

http://sourceforge.net/forum/message.php?msg_id=3983772
Re: RE: A potentially dangerous Request.Form
toadicusrex wrote:Or, you can really solve the problem.

http://sourceforge.net/forum/message.php?msg_id=3983772


Excellent! Now I don't need to set validateRequest=false for the entire page. Thanks!
Any chance this fix will be incorporated into the mainline code?
-Frank
Re: A potentially dangerous Request.Form
Where do you put this code? I tried putting it into the aspx file that has the form in it, but it didn't help at all.
Re: A potentially dangerous Request.Form
I was able to solve the problem by adding:

oFCKeditor.Config['HtmlEncodeOutput']=true;

to the following:

var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Height = 300 ;
oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;
oFCKeditor.Config['HtmlEncodeOutput']=true;
oFCKeditor.Create() ;
Re: A potentially dangerous Request.Form
Full solution for ASP.NET MVC2:
http://arturito.net/2011/05/26/ckeditor-a-potentially-dangerous-request-form-value-was-detected-from-the-client/

No need to touch web.config or add attributes.
Re: A potentially dangerous Request.Form
Hi, I'm thankful too. I just like to know what is the actual problem of this. Can I prevent to happen it, because It really a real mess to solve the problem multiple times.