Skip to content
Permalink
Browse files

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

…is escaped.
  • Loading branch information
jeresig committed Jan 2, 2009
1 parent 6a3d1a1 commit c59bf424a1aff179ad8b5cf51c157cd5f7f8a491
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/unit/core.js
@@ -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();

0 comments on commit c59bf42

Please sign in to comment.
You can’t perform that action at this time.