question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

URLs starting with slash are considered file:/// URLs

See original GitHub issue

When 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.

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
ramadiscommented, Oct 16, 2018

@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.

0reactions
danburzocommented, Oct 17, 2018

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)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found