diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index a06facac..787ef270 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -824,8 +824,8 @@ class Utils { } if (removeScriptAndStyle) { - htmlStr = recursiveRemove(/]*>[/s/S]*?<\/script[^>]*>/gi, htmlStr); - htmlStr = recursiveRemove(/]*>[/s/S]*?<\/style[^>]*>/gi, htmlStr); + htmlStr = recursiveRemove(/]*>(\s|\S)*?<\/script[^>]*>/gi, htmlStr); + htmlStr = recursiveRemove(/]*>(\s|\S)*?<\/style[^>]*>/gi, htmlStr); } return recursiveRemove(/<[^>]+>/g, htmlStr); }