mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 10:14:53 -04:00
Last attempt to try and satisfy CodeQL
This commit is contained in:
parent
e6a50df732
commit
46799891d0
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue