Przeglądaj źródła

add test for disallowed `>` and `<` in attribute values (see #3630)

Simon Krajewski 10 lat temu
rodzic
commit
d96808381a
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      tests/unit/src/unit/TestXML.hx

+ 3 - 0
tests/unit/src/unit/TestXML.hx

@@ -214,6 +214,9 @@ class TestXML extends Test {
 	}
 	}
 
 
 	function testIssue3630() {
 	function testIssue3630() {
+		exc(function() Xml.parse("<node attribute='<'/>"));
+		exc(function() Xml.parse("<node attribute='>'/>"));
+
 		var a = Xml.parse('<node attribute="something with &lt; &amp; &quot; &apos; special characters &gt;"/>');
 		var a = Xml.parse('<node attribute="something with &lt; &amp; &quot; &apos; special characters &gt;"/>');
 		var c = a.firstChild();
 		var c = a.firstChild();
 		eq('something with < & " \' special characters >', c.get("attribute"));
 		eq('something with < & " \' special characters >', c.get("attribute"));