ttrss_plugin-af_feedmod icon indicating copy to clipboard operation
ttrss_plugin-af_feedmod copied to clipboard

Rewriting relative URLs

Open dswd opened this issue 11 years ago • 0 comments

Convert relative URLs embedded in the content to absolute URLs so that they point to the correct destination. This rewrites URLs based on the following rules:

  • If the URL contains a colon like in 'http://' or 'https://' or 'mailto:' it is considered absolute and not rewritten
  • If the URL starts with a hash, it is considered a page-internal anchor that does not have to be rewritten
  • If the URL starts with a double slash, it is considered absolute and not rewritten
  • Anything else that starts with a slash is rewritten by prepending the host part (everything before the first slash, after the first double-slash) of the original URL
  • Anything else is rewritten by prepending the directory part (everything before the last slash) of the original URL

dswd avatar Sep 17 '14 14:09 dswd