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