Skip to content

Commit e465151

Browse files
committed
fix: fixed codeql vulnerability
closes #39
1 parent af502ad commit e465151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/html-to-jsx.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ HTMLtoJSX.prototype = {
348348
html = html.trim();
349349
// Ugly method to strip script tags. They can wreak havoc on the DOM nodes
350350
// so let's not even put them in the DOM.
351-
html = html.replace(/<script([\s\S]*?)<\/script>/g, "");
351+
html = html.replace(/<script\b[^>]*>([\s\S]*?)<\/script>/gi, "");
352352
return html;
353353
},
354354

0 commit comments

Comments
 (0)