Tweak regexp and exclude non-url entries #179.

This commit is contained in:
Mikhail Golenkov
2020-02-06 18:02:59 +11:00
parent ae85c94364
commit 7a1fa1f91b

View File

@@ -148,7 +148,7 @@ class maintenance_static_page_generator {
global $CFG;
$contents = file_get_contents($filename);
if (!preg_match_all('#url\([\'"]?([^\'"\)]+)#', $contents, $matches)) {
if (!preg_match_all('#url\([\'"]?(?!data:)([^\'"\)]+)#', $contents, $matches)) {
return;
}
foreach ($matches[1] as $originalurl) {