Bug 41383 - AllowHtmlAttribute ignored throwing exception on POST using ASP.NET mvc
Summary: AllowHtmlAttribute ignored throwing exception on POST using ASP.NET mvc
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 4.5.X
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-31 01:31 UTC by Juan Urroa
Modified: 2016-05-31 01:31 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Juan Urroa 2016-05-31 01:31:27 UTC
This is the same bug as https://bugzilla.xamarin.com/show_bug.cgi?id=8965 happening on the version for centos 7 installed as described in the downloads page of mono (version mono-complete-4.2.3.4-0) but I can't find a way to reopen the bug.
The version of mvc is System.Web.Mvc 5.2.3.0 as installed by the template from visual studio
This is the original bug description the current version does the same:


Syed Rahman 2011-07-07 22:49:09 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.0; rv:5.0) Gecko/20100101
Firefox/5.0

Using the AllowHtmlAttribute to mark a property on a model so that you can post
html on a form to your controller throws an exception

System.Web.HttpRequestValidationException

with the "A potentially dangerous Form value ..."
messasge even though the AllowHtmlAttribute property is for the purpose of not
validating to see if html exists in property.


Reproducible: Always

Steps to Reproduce:
1. Create a model with a property marked with [AllowHtml]
2. Create a controller with both Get and Post action with the model being in
post
3. Create a view which submits to controller action, with the property being a
textbox, and a button ot submit
4. Fire up the view, put some html in the textbox and post

Exception thrown

In step 4, put basic text, submits fine
Actual Results:  
Exception thrown

Expected Results:  
Should have submitted form to action

Note You need to log in before you can comment on or make changes to this bug.