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