[Mono-bugs] [Bug 704529] New: AllowHtmlAttribute ignored throwing exception on POST using ASP.NET mvc3

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 7 18:49:10 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=704529

https://bugzilla.novell.com/show_bug.cgi?id=704529#c0


           Summary: AllowHtmlAttribute ignored throwing exception on POST
                    using ASP.NET mvc3
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: muizsyed at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


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

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list