}
[Test]
- public void SearchForTextOfTag_Null ()
+ public void SearchForTextOfTag_Tag_Null ()
{
try {
elem.SearchForTextOfTag (null);
{
const string xml = @"
<values>
- <value name='"name"&<address>'><'Suds' & "Soda">!</value>
+ <value name="""name"&<address>""><'Suds' & "Soda">!</value>
</values>";
SecurityElement se = SecurityElement.FromString (xml);
SecurityElement child = se.Children [0] as SecurityElement;
Assert.IsNotNull (child, "#B1");
Assert.IsNotNull (child.Attributes, "#B2");
- Assert.AreEqual ("'\"name\"&<address>'", child.Attribute ("name"), "#B3");
+ Assert.AreEqual ("\"name\"&<address>", child.Attribute ("name"), "#B3");
Assert.AreEqual ("value", child.Tag, "#B4");
Assert.AreEqual ("<'Suds' & \"Soda\">!", child.Text, "#B5");
Assert.IsNull (child.Children, "#B6");
}
+
+ [Test] // bug #333725
+ [Category ("NotWorking")]
+ public void FromString_CharacterReferences ()
+ {
+ const string xml = @"
+ <value name=""name&address"">Suds&Soda&</value>";
+
+ SecurityElement se = SecurityElement.FromString (xml);
+ Assert.IsNotNull (se, "#1");
+ Assert.IsNotNull (se.Attributes, "#2");
+ Assert.AreEqual ("name&address", se.Attribute ("name"), "#3");
+ Assert.AreEqual ("value", se.Tag, "#4");
+ Assert.AreEqual ("Suds&Soda&", se.Text, "#5");
+ Assert.IsNull (se.Children, "#6");
+ }
#endif
}
}