Fixed bad HTML filtering

This commit is contained in:
n1474335 2023-03-13 18:13:54 +00:00
parent 51e2b97595
commit ccea5cdf88

View file

@ -824,8 +824,8 @@ class Utils {
}
if (removeScriptAndStyle) {
htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script[^>]*>/gi, htmlStr);
htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style[^>]*>/gi, htmlStr);
htmlStr = recursiveRemove(/<script[^>]*>[/s/S]*?<\/script[^>]*>/gi, htmlStr);
htmlStr = recursiveRemove(/<style[^>]*>[/s/S]*?<\/style[^>]*>/gi, htmlStr);
}
return recursiveRemove(/<[^>]+>/g, htmlStr);
}