[Mono-bugs] [Bug 596430] New: HtmlImage.Src should not be HtmlAttributeEncoded

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 13 23:23:23 EDT 2010



           Summary: HtmlImage.Src should not be HtmlAttributeEncoded
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: Other
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: curtis.wensley at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=354237)
 --> (http://bugzilla.novell.com/attachment.cgi?id=354237)
Sample to repro the issue

Description of Problem:
When using the HtmlImage server control (in MS.NET), existing code must set the
Src property using HttpUtility.HtmlAttributeEncode() manually to ensure that it
is encoded.

In mono, it is encoded automatically, which breaks existing code since it will
encode the attribute twice and images do not show.


HtmlImage img = new HtmlImage();
img.Src =

Steps to reproduce the problem:
1. Open attached sample, or use the above code to add an image to your form
2. View source

Actual Results:
Mono outputs (note extra 'amp;'):
<img src="/image.ashx?name=tick.png&amp;amp;option=big" />

Expected Results:
Should output:
<img src="/image.ashx?name=tick.png&amp;option=big" />

How often does this happen? 
Every time.

Additional Information:
This may be applicable to other attributes of Html* controls..  AFAIK, none of
the MS.NET framework encodes attributes of Html* controls.

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

More information about the mono-bugs mailing list