git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The exact escaping of the text() test isn't important - as long as < is escaped.
[jquery.git]
/
test
/
unit
/
core.js
diff --git
a/test/unit/core.js
b/test/unit/core.js
index
71bfc81
..
ac65dcc
100644
(file)
--- a/
test/unit/core.js
+++ b/
test/unit/core.js
@@
-1520,7
+1520,7
@@
test("removeAttr(String", function() {
test("text(String)", function() {
expect(4);
test("text(String)", function() {
expect(4);
- equals( jQuery("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML, "<div><b>Hello</b> cruel world!</div>", "Check escaped text" );
+ equals( jQuery("#foo").text("<div><b>Hello</b> cruel world!</div>")[0].innerHTML.replace(/>/g, ">"), "<div><b>Hello</b> cruel world!</div>", "Check escaped text" );
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();
// using contents will get comments regular, text, and comment nodes
var j = jQuery("#nonnodes").contents();