Author: krasnov
Date: 2006-03-19 12:16:09 -0500 (Sun, 19 Mar 2006)
New Revision: 58162
Modified:
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputImage.cs
Log:
* HtmlAnchor.cs: fixed RenderAttributes, if target attribute is empty it
shouldn't be rendered
* HtmlForm.cs: fixed Method, default method "post" should be added if its value
null or empty string
* HtmlInputImage.cs: fixed SetAtt, it removes attributes if it has null value,
the fix is to remove attributes with empty string value too
Modified: trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
2006-03-19 17:14:08 UTC (rev 58161)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog
2006-03-19 17:16:09 UTC (rev 58162)
@@ -1,3 +1,12 @@
+2006-03-19 Vladimir Krasnov <[EMAIL PROTECTED]>
+
+ * HtmlAnchor.cs: fixed RenderAttributes, if target attribute is empty
+ it shouldn't be rendered
+ * HtmlForm.cs: fixed Method, default method "post" should be added if
+ its value null or empty string
+ * HtmlInputImage.cs: fixed SetAtt, it removes attributes if it has null
+ value, the fix is to remove attributes with empty string value too
+
2006-02-23 Chris Toshok <[EMAIL PROTECTED]>
* HtmlButton.cs: fix corcompare output.
Modified: trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
2006-03-19 17:14:08 UTC (rev 58161)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
2006-03-19 17:16:09 UTC (rev 58162)
@@ -155,6 +155,11 @@
if (hr != "")
HRef = ResolveUrl (hr);
}
+
+ string target = Attributes ["target"];
+ if ((target == null) || (target.Length == 0))
+ Attributes.Remove("target");
+
base.RenderAttributes (writer);
// but we never set back the href attribute after the
rendering
Modified: trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
2006-03-19 17:14:08 UTC (rev 58161)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
2006-03-19 17:16:09 UTC (rev 58162)
@@ -100,7 +100,7 @@
get {
string method = Attributes["method"];
- if (method == null) {
+ if ((method == null) || (method.Length == 0)) {
return ("post");
}
Modified:
trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputImage.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputImage.cs
2006-03-19 17:14:08 UTC (rev 58161)
+++ trunk/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputImage.cs
2006-03-19 17:16:09 UTC (rev 58162)
@@ -255,7 +255,7 @@
private void SetAtt (string name, string value)
{
- if (value == null)
+ if ((value == null) || (value.Length == 0))
Attributes.Remove (name);
else
Attributes [name] = value;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches