b.Close ();
}
- [MonoTODO]
protected virtual string EncodeAttributeValue (HtmlTextWriterAttribute attrKey, string value)
{
- return value;
+ return HttpUtility.HtmlEncode (value);
}
- [MonoTODO]
protected string EncodeAttributeValue (string value, bool fEncode)
{
+ if (fEncode)
+ return HttpUtility.HtmlEncode (value);
return value;
}
- [MonoTODO]
protected string EncodeUrl (string url)
{
- return url;
+ return HttpUtility.UrlPathEncode (url);
}
// faster than a linear search?
foreach (HtmlAttribute t in htmlattrs) {
- if (t.name == attrName)
+ if (String.Compare(t.name, attrName, true, CultureInfo.InvariantCulture) == 0)
return t.key;
}
- return 0;
+ return (HtmlTextWriterAttribute)(-1);
}
[MonoTODO]
// faster than a linear search?
foreach (HtmlStyle t in htmlstyles) {
- if (t.name == styleName)
+ if (String.Compare(t.name, styleName, true, CultureInfo.InvariantCulture) == 0)
return t.key;
}
- return 0;
+ return (HtmlTextWriterStyle)(-1);
}
[MonoTODO]
// faster than a linear search?
foreach (HtmlTag t in tags) {
- if (t.name == tagName)
+ if (String.Compare(t.name, tagName, true, CultureInfo.InvariantCulture) == 0)
return t.key;
}
if (! newline)
return;
newline = false;
-
+
for (int i = 0; i < Indent; i ++)
b.Write (tab_string);
}
new HtmlStyle (HtmlTextWriterStyle.ZIndex, "z-index"),
#endif
};
+
+#if NET_2_0
+ public virtual bool IsValidFormAttribute (string attribute)
+ {
+ return true;
+ }
+
+ // writes <br />
+ public virtual void WriteBreak ()
+ {
+ string br = GetTagName (HtmlTextWriterTag.Br);
+ WriteBeginTag (br);
+ Write (SelfClosingTagEnd);
+ }
+#endif
}
}