Permalink
Browse files

Cleaner script tags with document.write

  • Loading branch information...
1 parent c864e93 commit 1ba906010e736e93aff8a0cef4fdb6df03dd1426 @wagenet wagenet committed May 22, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/index.html
View
@@ -64,7 +64,7 @@ <h2 id="qunit-userAgent"></h2>
<script>
// Load jshint if being used (can cause failurs in old environments if always loaded)
if (jsHint) {
- document.write(unescape('%3Cscript src="jshint.js"%3E%3C/script%3E'));
+ document.write('<script src="jshint.js"><\/script>');
}
// Close the script tag to make sure document.write happens
</script>
@@ -73,7 +73,7 @@ <h2 id="qunit-userAgent"></h2>
// Load custom version of jQuery if possible
var jQueryVersion = QUnit.urlParams.jquery || "1.7.2";
if (jQueryVersion !== 'none') {
- document.write(unescape('%3Cscript src="http://code.jquery.com/jquery-'+jQueryVersion+'.js"%3E%3C/script%3E'));
+ document.write('<script src="http://code.jquery.com/jquery-'+jQueryVersion+'.js"><\/script>');
}
// Close the script tag to make sure document.write happens
</script>
@@ -82,7 +82,7 @@ <h2 id="qunit-userAgent"></h2>
// Fallback to default jQuery
if (jQueryVersion !== 'none' && !window.jQuery) {
if (console && console.warn) { console.warn("Unable to load jQuery "+jQueryVersion+". Using default."); }
- document.write(unescape('%3Cscript src="../lib/jquery-1.7.2.js"%3E%3C/script%3E'));
+ document.write('<script src="../lib/jquery-1.7.2.js"><\/script>');
}
// Close the script tag to make sure document.write happens
</script>
@@ -102,7 +102,7 @@ <h2 id="qunit-userAgent"></h2>
var emberFile = distros[dist];
if (!emberFile) { throw 'Unknown dist'; }
- document.write(unescape('%3Cscript src="../dist/'+emberFile+'"%3E%3C/script%3E'));
+ document.write('<script src="../dist/'+emberFile+'"><\/script>');
// Close the script tag to make sure document.write happens
</script>

0 comments on commit 1ba9060

Please sign in to comment.