12345678910111213141516171819202122232425 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width" />
- <title>Sapphire</title>
- </head>
- <body>
- <script src="../src/sanitize.js"></script>
- <script>
- let xhr = new XMLHttpRequest();
- xhr.onreadystatechange = function() {
- if (xhr.readyState == XMLHttpRequest.DONE) {
- strs = xhr.responseText.split('\n').map(sanitizeHtmlString);
- for (let x of strs) {
- document.body.innerHTML += x;
- }
- }
- }
- xhr.open('GET', '../vendor/xss.txt', true);
- xhr.send(null);
- </script>
- </body>
- </html>
|