Skip to content

Commit

Permalink
Update Sizzle and add test for sizzle getText fix. Removes usage of i…
Browse files Browse the repository at this point in the history
…nnerText. Fixes #11153.
  • Loading branch information
timmywil committed Mar 30, 2012
1 parent c68f4fe commit a29d482
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sizzle
Submodule sizzle updated 1 files
+4 −7 sizzle.js
6 changes: 5 additions & 1 deletion test/unit/manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var bareObj = function(value) { return value; };
var functionReturningObj = function(value) { return (function() { return value; }); };

test("text()", function() {
expect(4);
expect(5);
var expected = "This link has class=\"blog\": Simon Willison's Weblog";
equal( jQuery("#sap").text(), expected, "Check for merged text of more then one element." );

Expand All @@ -20,6 +20,10 @@ test("text()", function() {
frag.appendChild( document.createTextNode("foo") );

equal( jQuery( frag ).text(), "foo", "Document Fragment Text node was retreived from .text().");

var $newLineTest = jQuery("<div>test<br/>testy</div>").appendTo("#moretests");
$newLineTest.find("br").replaceWith("\n");
equal( $newLineTest.text(), "test\ntesty", "text() does not remove new lines (#11153)" );
});

test("text(undefined)", function() {
Expand Down

0 comments on commit a29d482

Please sign in to comment.