ttrss_plugin-af_feedmod
ttrss_plugin-af_feedmod copied to clipboard
Rewriting relative URLs
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