Skip to content

Commit

Permalink
test that <script> with "src" attribute is not evaled
Browse files Browse the repository at this point in the history
References madrobby#510
  • Loading branch information
mislav committed Sep 28, 2012
1 parent 9ca4cdb commit a2d8ea3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,16 @@ <h1>Zepto DOM unit tests</h1>
}
},

testNoEvalWithSrc: function (t) {
try {
window.someGlobalVariable = false
$('<\script src="remote.js">window.someGlobalVariable = true<\/script>').appendTo('body')
t.assert(!window.someGlobalVariable, 'expected SCRIPT with src not to be evaled')
} finally {
delete window.someGlobalVariable
}
},

testHtmlEval: function (t) {
try {
window.someGlobalVariable = false
Expand Down

0 comments on commit a2d8ea3

Please sign in to comment.