Fixed script regex for Locale

Affects issues:
- Fixed #1372, Fixed #1373
This commit is contained in:
Risto Lahtela 2020-03-26 11:13:56 +02:00
parent 96d6f7fa31
commit 6339696b58

View File

@ -107,7 +107,7 @@ public class Locale extends HashMap<Lang, Message> {
return from;
}
Pattern scripts = Pattern.compile("(<script>[\\s\\S]*?</script>|<script src=[\"|'].*[\"|']></script>|<link [\\s\\S]*?>)");
Pattern scripts = Pattern.compile("(<script id=[\"|'].*[\"|']>[\\s\\S]*?</script>|<script>[\\s\\S]*?</script>|<script src=[\"|'].*[\"|']></script>|<link [\\s\\S]*?>)");
Matcher scriptMatcher = scripts.matcher(from);
List<String> foundScripts = new ArrayList<>();