mozilla / readability

A standalone version of the readability lib
Other
8.79k stars 598 forks source link

srcset attribute and <source> src attribute urls should be replaced with absolute ones #485

Open 8enmann opened 5 years ago

8enmann commented 5 years ago

Images in this article: https://betterwebtype.com/rhythm-in-web-typography

danburzo commented 5 years ago

Side note: I coincidentally fixed this issue (filed for the same URL) in percollate, which uses Readability under the hood:

https://github.com/danburzo/percollate/blob/7137541da8401e9e2e8181c60f1e1a66c5fe09d8/src/enhancements.js#L93-L101

The "srcset" attribute should be parsed and the URIs inside resolved to their absolute counterparts. It also helps with Wikipedia pages to include better-quality images in the reader.

gijsk commented 5 years ago

Thanks for the clarification. I've updated the summary to reflect what I assume is then the issue with this page - if there are other URLs that you think need to be made absolute, please clarify further. Thank you!

danburzo commented 5 years ago

The only one that comes to mind right now is the src attribute on source elements.