Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong image paths when the site uses base HTML tag #6040

Open
ngosang opened this issue Oct 25, 2022 · 1 comment
Open

Wrong image paths when the site uses base HTML tag #6040

ngosang opened this issue Oct 25, 2022 · 1 comment

Comments

@ngosang
Copy link
Contributor

ngosang commented Oct 25, 2022

Wrong image paths when the site uses base HTML tag.

  1. Wallabag grabs this link => https://www.collabora.com/news-and-blog/news-and-events/introducing-nvk.html
  2. The images have relative paths => assets/images/blog/NVK-Logo_onBlack_RGB.png
  3. Wallabag uses the link path to build the absolute URL => https://www.collabora.com/news-and-blog/news-and-events/assets/images/blog/NVK-Logo_onBlack_RGB.png
  4. That URL is wrong because the page contains the baseHTML tag in the head => <base href="https://www.collabora.com/">
  5. Wallabag should find that tag in the HTML and use that base path to build the absolute URL => https://www.collabora.com/assets/images/blog/NVK-Logo_onBlack_RGB.png

The base HTML tag is not new. This must be affecting many sites.
https://www.w3schools.com/TAGs/tag_base.asp

Environment

  • Version: 2.5.2
  • Installation: Docker
@j0k3r
Copy link
Member

j0k3r commented Oct 25, 2022

Good point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants