Commit c59bf424 authored by John Resig's avatar John Resig

The exact escaping of the text() test isn't important - as long as < is escaped.

parent 6a3d1a1e
...@@ -1520,7 +1520,7 @@ test("removeAttr(String", function() { ...@@ -1520,7 +1520,7 @@ test("removeAttr(String", function() {
test("text(String)", function() { test("text(String)", function() {
expect(4); expect(4);
equals( jQuery("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML, "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;", "Check escaped text" ); equals( jQuery("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML.replace(/>/g, "&gt;"), "&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;", "Check escaped text" );
// using contents will get comments regular, text, and comment nodes // using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents(); var j = jQuery("#nonnodes").contents();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment