aboutsummaryrefslogtreecommitdiff
path: root/lib/favicons.php
diff options
context:
space:
mode:
authorGravatar Thomas Renes <thomas@renesweb.nl> 2024-01-26 11:08:10 +0100
committerGravatar GitHub <noreply@github.com> 2024-01-26 11:08:10 +0100
commit0c023a7b5c4f2c8358f33733189b581e593d8e11 (patch)
tree12bd93abb64fe9ede57ade3613f2678dea02302b /lib/favicons.php
parentd61734a5e03843d0ed427cd0a8ed85fa7c71427c (diff)
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.
Diffstat (limited to 'lib/favicons.php')
-rw-r--r--lib/favicons.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/favicons.php b/lib/favicons.php
index 48b649c28..8bfa8e001 100644
--- a/lib/favicons.php
+++ b/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);