I tried to switch from absolute URLs to relative ones and set
<content type="html" xml:base="…">
, but that didn't work out at all. I should have used <base>
in <content type="html">
instead. No luck, either. In the Firefox extension Feed Preview the feed URL is used to resolve all the links which resulted in tons of dead links, because the base URL and feed URL are quite different.In Newsboat and Vivaldi's feed view this worked, though. Newsboat implements several mechanisms to resolve URLs, e.g.
<link>
and even xml:base
attributes, but unless I didn't miss it, there's no special handling for <base>
tags in the <content>
. Not sure on the exact algorithm Vivaldi implements.I simply cannot find any official documents explicitly stating relative link resolution strategies. Section 2 of the Atom specification explicitly allows the use of
xml:base
:| Any element defined by this specification MAY have an xml:base
| attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an
| Atom Document, it serves the function described in section 5.1.1 of
| [RFC3986], establishing the base URI (or IRI) for resolving any
| relative references found within the effective scope of the xml:base
| attribute.
|
| — https://www.rfc-editor.org/rfc/rfc4287#section-2
But that only counts for XML and not HTML, as the Feed Preview author pointed out to me after I sent him an e-mail.
To make things worse, the W3C Feed Validator issues a warning when using
<base>
in the <content>
:| content should not contain base tag
The explanation is of completely generic nature and doesn't help a bit in this particual instance.
Both the issued warning and the lack of documents describing URL resolution heavily suggest that this is not a bug in the Feed Preview but rather some implementation detail that might just work, or not. I wasted several hours with a mate this evening to experiment and read specs. No result, though. Thus, I reverted back to absolute URLs. Quite sad, can it be true that this simply doesn't work reliably? Any hints and thoughts are greatly appreciated!