diff --git a/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php b/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php index 51adf55fb7..53a859b64f 100644 --- a/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php +++ b/src/Appwrite/Platform/Modules/Avatars/Http/Favicon/Get.php @@ -97,7 +97,10 @@ class Get extends Action $space = 0; $linkTags = []; - $html = \preg_replace('//s', '', $res->getBody()) ?? $res->getBody(); + $html = $res->getBody(); + $html = \preg_replace('//s', '', $html) ?? $html; + $html = \preg_replace('/]*>.*?<\/script>/is', '', $html) ?? $html; + $html = \preg_replace('/]*>.*?<\/style>/is', '', $html) ?? $html; \preg_match_all('/]*>/i', $html, $linkTags); foreach ($linkTags[0] ?? [] as $tag) {