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 7b16bd1 commit b1ba30cCopy full SHA for b1ba30c
CWE-80/main.js
@@ -1,10 +1,7 @@
1
const main = (html) => {
2
- const scriptRegex = /<script\b[^>]*>([\s\S]*?)<\/script>/gi
3
- let match
+ const regex = /<script\b[^>]*>([\s\S]*?)<\/script>/gi
4
5
- while ((match = scriptRegex.exec(html)) !== null) {
6
- html = html.replace(match[0], match[1])
+ if (regex.test(html)) {
+ document.body.innerHTML = html
7
}
8
-
9
- return html
10
0 commit comments