deathau / markdownload

A Firefox and Google Chrome extension to clip websites and download them into a readable markdown file.
Apache License 2.0
2.91k stars 226 forks source link

Make sure the 'href' attribute of the base tag points to the web page's base.. #308

Closed WetHat closed 3 months ago

WetHat commented 8 months ago

Fixes issue #201 .

Some website specify the href of the base tag as '/' rather than the base uri of the website. This causes the JDOMParser to set:

when it parse HTML text in the background context. As a consequence Readability.js generates garbage for local links.

With this change https://steven-giesel.com/blogPost/79ce95ad-17a9-4537-8f1b-48d71efc585d reported by @nicolaiarocci works ok;

image