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
This commit is contained in:
wn_ 2017-10-01 14:25:12 -05:00
parent 0f0d6ca559
commit 241f69e4db
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}