alphapapa / org-web-tools

View, capture, and archive Web pages in Org-mode
GNU General Public License v3.0
647 stars 33 forks source link

Fix/modify relative URLs when inserting entries #41

Open pinoaffe opened 3 years ago

pinoaffe commented 3 years ago

After using org-web-tools-insert-web-page-as-entry' ororg-web-tools-convert-links-to-page-entries' some relative urls within the web page are still relative in the org entry, which means they are now relative to the org file the page was inserted into, rather than to the original webpage. I think it would be useful if these urls were to be made "absolute", so that they refer to the corresponding online content. I think this applies to links and references to files such as images.Fix relative links / urls / references

alphapapa commented 3 years ago

Yes, that seems like a good idea. Do you have any ideas for the best way to implement it? I don't know if there is any existing code in Emacs/EWW that could help. If not, I guess we could use the dom library to find anchors and adjust them, but we might need to be careful about performance.

alphapapa commented 11 months ago

See https://github.com/alphapapa/org-web-tools/pull/46#pullrequestreview-1790975511