Permalink
Browse files

2005-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>

	* DropDownListTest.cs: test for html-encoding of the text.


svn path=/trunk/mcs/; revision=54362
  • Loading branch information...
1 parent 0ed5b8f commit 109e14360e0311892152fbe51eff1cf4b47ddebb @gonzalop gonzalop committed Dec 14, 2005
@@ -1,3 +1,7 @@
+2005-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * DropDownListTest.cs: test for html-encoding of the text.
+
2005-11-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* RadioButtonTest.cs: more tests for the 'name' attribute.
@@ -383,5 +383,15 @@ public void TestValueFieldAndTextFormat ()
#endif
Assert.AreEqual (exp, ddl.Render ());
}
+
+ [Test]
+ public void HtmlEncodeItem ()
+ {
+ DropDownListTestClass d = new DropDownListTestClass ();
+ d.Items.Add(new ListItem ("text1", "<hola>"));
+ Assert.IsTrue (d.Render().IndexOf ("<hola>") == -1, "#01");
+ Assert.IsTrue (d.Render().IndexOf ("&lt;hola&gt;") != -1, "#02");
+ }
+
}
}

0 comments on commit 109e143

Please sign in to comment.