Last attempt to try and satisfy CodeQL
This commit is contained in:
parent
e6a50df732
commit
46799891d0
@ -134,7 +134,8 @@ class ParseAITokens extends Operation {
|
||||
*/
|
||||
replaceSpacesOutsideTags(htmlString) {
|
||||
return htmlString
|
||||
.replace(/(<script\b[^>]*>.*?<\/script>)|(<[^>]*?>)|(\s+)/gi, (match, scriptTag, htmlTag, spaces) => {
|
||||
.replace(/<script/ig, "<script")
|
||||
.replace(/(<script\b[^>]*>.*?<\/script>)|(<[^>]*?>)|(\s+)/gi, (match, scriptTag, htmlTag, spaces) => {
|
||||
if (scriptTag) {
|
||||
// Sanitize the <script> tag by escaping it
|
||||
return scriptTag
|
||||
@ -148,7 +149,6 @@ class ParseAITokens extends Operation {
|
||||
return "";
|
||||
}
|
||||
})
|
||||
.replace(/<script/ig, "<script") // satisfy codeql
|
||||
.replace(/[\r\n]/g, "");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user