diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-01 23:55:32 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-01 23:55:32 +0400 |
commit | 5e0747a8a13c05e72a8cd4db9c88e9a34954704e (patch) | |
tree | d740363f2a68f2a464ba7393b368a592726e1c5c /mcs/class/System.Web | |
parent | a4c94a25d260af14410c46d87f9fefbacb803673 (diff) |
2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Xml.cs: fixed get_DocumentContent (it was returning "" always!) and
don't call MapPathSecure on the content itself.
* XmlBuilder.cs: handle XML documents written inside asp:xml. The
document is checked at parse time and will be checked again at run time.
Fixes bug #63828.
svn path=/trunk/mcs/; revision=33175
Diffstat (limited to 'mcs/class/System.Web')
3 files changed, 68 insertions, 38 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog index 84a3b7ba439..33db14a8545 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog @@ -1,73 +1,83 @@ +2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Xml.cs: fixed get_DocumentContent (it was returning "" always!) and + don't call MapPathSecure on the content itself. + + * XmlBuilder.cs: handle XML documents written inside asp:xml. The + document is checked at parse time and will be checked again at run time. + + Fixes bug #63828. + 2004-08-31 Sanjay Gupta <gsanjay@novell.com> * AuthenticateEventHandler.cs: * CreateUserErrorEventArgs.cs: * CreateUserErrorEventHandler.cs: - * DetailsViewCommandEventHandler.cs: + * DetailsViewCommandEventHandler.cs: * DetailsViewDeleteEventArgs.cs: * DetailsViewDeleteEventHandler.cs: * DetailsViewDeletedEventArgs.cs: - * DetailsViewDeletedEventHandler.cs: + * DetailsViewDeletedEventHandler.cs: * DetailsViewInsertEventArgs.cs: * DetailsViewInsertEventHandler.cs: * DetailsViewInsertedEventArgs.cs: * DetailsViewInsertedEventHandler.cs: * DetailsViewModeEventArgs.cs: - * DetailsViewModeEventHandler.cs: + * DetailsViewModeEventHandler.cs: * DetailsViewPageEventHandler.cs: * DetailsViewUpdateEventArgs.cs: * DetailsViewUpdateEventHandler.cs: * DetailsViewUpdatedEventArgs.cs: - * DetailsViewUpdatedEventHandler.cs: - * FormViewCommandEventHandler.cs: + * DetailsViewUpdatedEventHandler.cs: + * FormViewCommandEventHandler.cs: * FormViewDeleteEventArgs.cs: * FormViewDeleteEventHandler.cs: * FormViewDeletedEventArgs.cs: - * FormViewDeletedEventHandler.cs: + * FormViewDeletedEventHandler.cs: * FormViewInsertEventArgs.cs: - * FormViewInsertEventHandler.cs: + * FormViewInsertEventHandler.cs: * FormViewInsertedEventArgs.cs: - * FormViewInsertedEventHandler.cs: + * FormViewInsertedEventHandler.cs: * FormViewModeEventHandler.cs: - * FormViewPageEventHandler.cs: + * FormViewPageEventHandler.cs: * FormViewUpdateEventArgs.cs: - * FormViewUpdateEventHandler.cs: + * FormViewUpdateEventHandler.cs: * FormViewUpdatedEventArgs.cs: - * FormViewUpdatedEventHandler.cs: + * FormViewUpdatedEventHandler.cs: * GridViewCancelEditEventArgs.cs: * GridViewCancelEditEventHandler.cs: - * GridViewCommandEventHandler.cs: + * GridViewCommandEventHandler.cs: * GridViewDeleteEventArgs.cs: - * GridViewDeleteEventHandler.cs: + * GridViewDeleteEventHandler.cs: * GridViewDeletedEventArgs.cs: - * GridViewDeletedEventHandler.cs: + * GridViewDeletedEventHandler.cs: * GridViewEditEventHandler.cs: - * GridViewPageEventHandler.cs: + * GridViewPageEventHandler.cs: * GridViewRowEventHandler.cs: - * GridViewSelectEventHandler.cs: + * GridViewSelectEventHandler.cs: * GridViewSortEventArgs.cs: - * GridViewSortEventHandler.cs: + * GridViewSortEventHandler.cs: * GridViewUpdateEventArgs.cs: - * GridViewUpdateEventHandler.cs: + * GridViewUpdateEventHandler.cs: * GridViewUpdatedEventArgs.cs: - * GridViewUpdatedEventHandler.cs: + * GridViewUpdatedEventHandler.cs: * ImageMapEventHandler.cs: - * MailMessageEventHandler.cs: + * MailMessageEventHandler.cs: * MenuEventHandler.cs: - * ObjectDataSourceDisposingEventHandler.cs: - * ObjectDataSourceEventHandler.cs: - * ObjectDataSourceMethodEventArgs.cs: - * ObjectDataSourceMethodEventHandler.cs: + * ObjectDataSourceDisposingEventHandler.cs: + * ObjectDataSourceEventHandler.cs: + * ObjectDataSourceMethodEventArgs.cs: + * ObjectDataSourceMethodEventHandler.cs: * ObjectDataSourceSelectingEventArgs.cs: - * ObjectDataSourceSelectingEventHandler.cs: - * ObjectDataSourceStatusEventArgs.cs: - * ObjectDataSourceStatusEventHandler.cs: - * SendMailErrorEventHandler.cs: + * ObjectDataSourceSelectingEventHandler.cs: + * ObjectDataSourceStatusEventArgs.cs: + * ObjectDataSourceStatusEventHandler.cs: + * SendMailErrorEventHandler.cs: * SiteMapNodeItemEventHandler.cs: - * SqlDataSourceSelectingEventArgs.cs: - * SqlDataSourceSelectingEventHandler.cs: + * SqlDataSourceSelectingEventArgs.cs: + * SqlDataSourceSelectingEventHandler.cs: * TreeNodeEventHandler.cs: - * WizardNavigationEventArgs.cs: + * WizardNavigationEventArgs.cs: * WizardNavigationEventHandler.cs: Minor modifications, compiler error corrections and removing "sealed" access specifier from *EventHandler.cs diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs index ff9aacac78b..e2bca533f8f 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs @@ -116,7 +116,7 @@ namespace System.Web.UI.WebControls [WebSysDescription ("The XML content that is transformed for the XML Webcontrol.")] public string DocumentContent { get { - return String.Empty; + return documentContent; } set { document = null; @@ -192,7 +192,7 @@ namespace System.Web.UI.WebControls private void LoadXpathDoc () { if (documentContent != null && documentContent.Length > 0) { - xpathDoc = new XPathDocument (new StringReader (MapPathSecure (documentContent))); + xpathDoc = new XPathDocument (new StringReader (documentContent)); return; } diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs index 4aaa88a7580..445e87143d2 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs @@ -2,8 +2,10 @@ // System.Web.UI.WebControls.XmlBuilder.cs // // Author: -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) +// Gonzalo Paniagua Javier (gonzalo@novell.com) // +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) // // @@ -29,14 +31,16 @@ using System; using System.Collections; +using System.Web.Compilation; using System.Web.UI; +using System.Xml; namespace System.Web.UI.WebControls { - internal class XmlBuilder : ControlBuilder + class XmlBuilder : ControlBuilder { public override void AppendLiteralString (string s) - { + { } public override Type GetChildControlType (string tagName, IDictionary attribs) @@ -49,10 +53,26 @@ namespace System.Web.UI.WebControls return true; } - [MonoTODO ("find out what this does and implement")] public override void SetTagInnerText (string text) { - throw new NotImplementedException (); + string trimmed = text.Trim (); + if (trimmed == "") + return; + + XmlDocument doc = new XmlDocument (); + try { + doc.LoadXml (text); + } catch (XmlException xmle) { + Location newloc = new Location (location); + if (xmle.LineNumber >= 0) + newloc.BeginLine += xmle.LineNumber - 1; + + location = newloc; + throw; + } + + base.AppendLiteralString (trimmed); } } } + |