فهرست منبع

Fix: Favicon with protocol-relative URLs have duplicate slashes. (#6068)

The URL of favicons with protocol-relative URL's already start with "//" so by adding it again it will result in "http:////url" and the icon will never be retrieved.
Thomas Renes 2 سال پیش
والد
کامیت
0c023a7b5c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      lib/favicons.php

+ 1 - 1
lib/favicons.php

@@ -92,7 +92,7 @@ function searchFavicon(string &$url): string {
 
 		// Handle protocol-relative URLs by adding the current URL's scheme
 		if (substr($href, 0, 2) === '//') {
-			$href = ($urlParts['scheme'] ?? 'https') . '://' . $href;
+			$href = ($urlParts['scheme'] ?? 'https') . ':' . $href;
 		}
 
 		$href = SimplePie_IRI::absolutize($baseUrl, $href);