Regex improvements

This commit is contained in:
n1474335 2023-03-13 18:28:05 +00:00
parent 13e3dba784
commit a24fdf4250
1 changed files with 2 additions and 2 deletions

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