URLs starting with slash are considered file:/// URLs
See original GitHub issueWhen an href
in the webpage starts with /
, it stays as is and hence the PDF viewer considers it a File URL. It should probably prepend it with the domain.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
To slash or not to slash | Google Search Central Blog
Historically, it's common for URLs with a trailing slash to indicate a directory, and those without a trailing slash to denote a file:....
Read more >Trailing Slashes in URLs – What is the Preferred Style?
Trailing Slashes Are Not Recommended for Files. Experts still argue about whether to add the slash after the URLs that point to files...
Read more >When should I use a trailing slash in my URL? - Stack Overflow
When you make your URL /about-us/ (with the trailing slash), it's easy to start with a single file index.html and then later expand...
Read more >Relative URLs should not start with / (slash) [#843002] - Drupal
I encountered this issue and at first considered it a bug since "/node/1" is certainly a valid URL for a link target. However,...
Read more >Trailing Slashes on URLs: Contentious or Settled? | CSS-Tricks
Semantically speaking, with a trailing slash you say that your URL is a directory. It makes sense with frameworks such as Hugo, as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@danburzo Apparently, setting the URL is not enough to trigger the relative paths transformation. This last solution adds a line that should fix this issue.
Thanks for looking into it, back to the drawing board then!
For whomever experiences this bug and would like to help debug it, it would be interesting to see the page content before and after Readability parses it, to see if it can successfully resolve relative links to absolute ones.
Alternatively, we should not rely on Readability to do the work for us, if we ever want to skip the Readability step? (#13)