http://bugzilla.novell.com/show_bug.cgi?id=596430

http://bugzilla.novell.com/show_bug.cgi?id=596430#c0


           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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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.

snippet:

HtmlImage img = new HtmlImage();
img.Src =
HttpUtility.HtmlAttributeEncode("/image.ashx?name=tick.png&option=big");
placeholder.Controls.Add(img);

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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to