mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
Regex improvements
This commit is contained in:
@@ -824,8 +824,8 @@ class Utils {
|
||||
}
|
||||
|
||||
if (removeScriptAndStyle) {
|
||||
htmlStr = recursiveRemove(/<script[^>]*>[/s/S]*?<\/script[^>]*>/gi, htmlStr);
|
||||
htmlStr = recursiveRemove(/<style[^>]*>[/s/S]*?<\/style[^>]*>/gi, htmlStr);
|
||||
htmlStr = recursiveRemove(/<script[^>]*>(\s|\S)*?<\/script[^>]*>/gi, htmlStr);
|
||||
htmlStr = recursiveRemove(/<style[^>]*>(\s|\S)*?<\/style[^>]*>/gi, htmlStr);
|
||||
}
|
||||
return recursiveRemove(/<[^>]+>/g, htmlStr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user