Regex improvements
This commit is contained in:
parent
13e3dba784
commit
a24fdf4250
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user