I installed VS2010 and MVC2 and verified a simple form using tinyMCE. When I send the contents of a text field to tinyMCE, I get a scary YSD and a message
"potentially dangerous ....."
I have seen this before, so I put ValidateInput(false) on the controller, but without joy - I still get the error.
The page code in edit.aspx is:
<% using (Html.BeginForm()){ %> <textarea id="elm1" name="mceText" rows="15" cols="80" style="width: 80%"> <p> This is some example text that you can edit inside the <strong> TinyMCE editor</strong>. </textarea> <br /> <input type="submit" name="save" value="Submit" /> <input type="reset" name="reset" value="Reset" /> <%} %>
and controller action:
[AcceptVerbs(HttpVerbs.Post)] [ValidateInput(false)] public ActionResult Edit(string mceText) { return View(); }
Any thoughts - (I know the code is not complete) tried this for hours, but everyone just says they use ValidateInput (false)
source share