parser
parser copied to clipboard
Postlight Reader | URLs broken
Expected Behavior
After I use the Postlight Reader Extension, I expect all links in the cleaned article to be functional.
Current Behavior
In the cleaned document (presented by the Postlight Reader extension), Links go from
/path (relative url)
to
chrome-extension://oknpjjbmpnndlpmnhmekjpocelpnlfdi/path.
Steps to Reproduce
- Open a web page containing relative URL
<a href="/test">
<a href="https://google.com/test">
- Parse with Postlight Reader Extension
- First link stops working, as the website domain changes to the chrome extension domain, all relative urls break
Possible Solution
While the article is being cleaned, retrieve the domain name and suffix all relative urls (href="/path") with the domain (href="domain.com/path").
Cool stuff, thank you :)
Yes, I have the same issue, relative url breaks in many other contexts too. Absolute url is needed.