Closed Zegnat closed 6 years ago
On cursory glance, this may be an issue with upstream micropub-helper (paging @grantcodes) or even one of their upstreams: the rel parsing in the used microformats parser.
Maybe glennjones/microformat-shiv#33? Not sure how much glennjones/microformat-node is used by upstream.
This appears to be a bug in micropub-helper. I should have the necessary code in another project, I will work on a fix and submit it.
Oh I think I know how to fix that, the microformats libraries have an option for a baseUrl
which should convert relative urls.
So I think if I grab the me
value and strip any trailing paths that should get the base URL.
the microformats libraries have an option for a
baseUrl
which should convert relative urls.
Yeah, that seems to be the issue.
if I grab the
me
value and strip any trailing paths that should get the base URL.
Not necessarily, there might be a BASE
element on the page that you have to use instead. URL resolution can be a little tricky.
Ok well I have updated micropub-helper
to at least pass the me
value. I have no idea how it will handle BASE
elements at the moment, I would hope that's something the microformats libraries would handle.
I've not published the updated micropub-helper
module to npm yet as I haven't had time to test properly but GitHub is updated if anyone wants to test for me.
@grantcodes you beat me by seconds with my PR and missed one case: the me
value is not necessary the final URL the HTML was delivered from (due to redirects). See my branch https://github.com/sknebel/micropub-1/tree/fix-relative - feel free to use that code.
I agree that <base>
tags should be handled by the mf2 parser. It seems like they aren't though, but that's clearly a parser bug.
Ok with thanks to @sknebel and @Zegnat I have updated micropub-helper
to v1.3.0 which should fix this issue when merged into the plugin.
I'd also recommend updating as the new version excludes all all the polyfills needed for node so should be a much smaller filesize :)
The following endpoint
LINK
will trip Omnibear:The user will get a page saying: