1 |
|
2 | <html>
|
3 | <head>
|
4 | <title>测试</title>
|
5 | <meta charset="utf8">
|
6 | </head>
|
7 | <body>
|
8 | <pre id="result"></pre>
|
9 | </body>
|
10 | </html>
|
11 | <script src="xss.js"></script>
|
12 | <script>
|
13 |
|
14 | document.querySelector('#result').innerText = code + '\n被转换成了\n' + filterXSS(code);
|
15 | </script> |
\ | No newline at end of file |