parser icon indicating copy to clipboard operation
parser copied to clipboard

Postlight Reader | URLs broken

Open TheOnlyWayUp opened this issue 2 years ago • 1 comments

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 :)

TheOnlyWayUp avatar Apr 02 '23 06:04 TheOnlyWayUp

Yes, I have the same issue, relative url breaks in many other contexts too. Absolute url is needed.

Rilomilo avatar Apr 14 '23 04:04 Rilomilo