mirror of
https://github.com/gchq/CyberChef.git
synced 2024-09-28 14:31:30 +02:00
Fixed bad HTML filtering
This commit is contained in:
parent
51e2b97595
commit
ccea5cdf88
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user