]> source.dussan.org Git - jquery.git/commitdiff
The exact escaping of the text() test isn't important - as long as < is escaped.
authorJohn Resig <jeresig@gmail.com>
Fri, 2 Jan 2009 19:23:12 +0000 (19:23 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 2 Jan 2009 19:23:12 +0000 (19:23 +0000)
test/unit/core.js

index 71bfc8118d8ba5d86f0e14e2bab6e3259a89f01e..ac65dccddeaaba35159d6313ee76431d980a4e05 100644 (file)
@@ -1520,7 +1520,7 @@ test("removeAttr(String", function() {
 
 test("text(String)", function() {
        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
        var j = jQuery("#nonnodes").contents();