michaelrsweet / htmldoc

HTML Conversion Software
https://www.msweet.org/htmldoc
GNU General Public License v2.0
206 stars 46 forks source link

incorrect href mapping (file://) #508

Closed step- closed 11 months ago

step- commented 1 year ago

Hello again,

with the same debug report in #507, this line

DEBUG: Mapping "file:///usr/share/doc/faqs/faq.html" to "http://distro.ibiblio.org:80/fatdog/web/file:///usr/share/doc/faqs/faq.html"...

shows that html doc maps a file:// protocol to the http:// protocol. Certainly this shouldn't be the case. I think that if the href value starts with a protocol component htmldoc should not map the value at all. Would you agree?

michaelrsweet commented 11 months ago

Relative URLs use the base URL, either the one in the HTML sources or from the input URL/filename.