We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f56eef6 commit e4b635aCopy full SHA for e4b635a
test-script-injection.js
@@ -3,8 +3,14 @@
3
and executing new inline scripts (script-injection attacks)
4
See https://github.com/bahmutov/disable-inline-javascript-tutorial
5
*/
6
-(function testScriptInjection() {
+(function testInlineScriptInjection() {
7
var el = document.createElement('script');
8
el.innerText = 'alert("hi there")';
9
document.body.appendChild(el); // runs the code by default
10
}());
11
+
12
+(function testExternalScriptInjection() {
13
+ var el = document.createElement('script');
14
+ el.src = 'https://rawgit.com/hakimel/reveal.js/tree/master/js';
15
+ document.body.appendChild(el);
16
+}());
0 commit comments