add test to guarantee that getEncodedText does not return html

This commit is contained in:
John Bender 2011-09-27 15:55:35 -07:00
parent d816fe1ec1
commit 9acbcb3b15
2 changed files with 2 additions and 0 deletions

View file

@ -121,5 +121,6 @@
test( "$.fn.getEncodedText should return the encoded value where $.fn.text doesn't", function() {
same( $("#encoded").text(), "foo>");
same( $("#encoded").getEncodedText(), "foo>");
same( $("#unencoded").getEncodedText(), "foo");
});
})(jQuery);

View file

@ -32,6 +32,7 @@
<div id="parent"></div>
<div id="dependent"></div>
<div id="encoded">foo&gt;</div>
<div id="unencoded"><script>foo</script></div>
</div>
</body>
</html>