Use a function to resolve links #5

Closed
opened 2020-03-24 07:49:06 +00:00 by lucidiot · 0 comments
Owner

Some websites use relative links, but RSS feeds require absolute links. The current approach to fix this is just to append the correct base URL to the link, except there is no check for an already absolute URL. There could be an URL resolution jq function:

resolve("http://root/folder/", "a") → "http://root/folder/a"
resolve("http://root/folder/", "/a") → "http://root/a"
resolve("http://root/folder/", "http://a") → "http://a"
Some websites use relative links, but RSS feeds require absolute links. The current approach to fix this is just to append the correct base URL to the link, except there is no check for an already absolute URL. There could be an URL resolution `jq` function: ``` resolve("http://root/folder/", "a") → "http://root/folder/a" resolve("http://root/folder/", "/a") → "http://root/a" resolve("http://root/folder/", "http://a") → "http://a" ```
lucidiot self-assigned this 2020-07-19 12:46:01 +00:00
lucidiot added the
enhancement
label 2020-07-26 13:53:28 +00:00
Sign in to join this conversation.
No description provided.