Regex improvements

This commit is contained in:
n1474335 2023-03-13 18:28:05 +00:00
parent 13e3dba784
commit a24fdf4250

View file

@ -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);
}