diff options
author | wn_ <[email protected]> | 2017-10-01 14:25:12 -0500 |
---|---|---|
committer | wn_ <[email protected]> | 2017-10-01 14:25:12 -0500 |
commit | 241f69e4db786daac259f1c7641006e1d2e28e2b (patch) | |
tree | d1b905565fc9efe5d5ca1ae3069a879f47ad8c86 /include/functions.php | |
parent | 0f0d6ca55945edca137ffb37a17856b93f8c88d8 (diff) |
Handle potentially-relative base element when getting favicon.
The base element's "href" attribute is not required to be absolute,
so rewrite relative to the site URL if it is relative.
See:
* https://www.w3.org/TR/html51/document-metadata.html#the-base-element
* https://html.spec.whatwg.org/multipage/semantics.html#the-base-element
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php index 8ea8719ca..71a6be2e9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -577,7 +577,7 @@ $base = $xpath->query('/html/head/base'); foreach ($base as $b) { - $url = $b->getAttribute("href"); + $url = rewrite_relative_url($url, $b->getAttribute("href")); break; } |