feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
212 stars 34 forks source link

Fix resolving relative links to absolute links #114

Closed pR0Ps closed 6 years ago

pR0Ps commented 6 years ago

rel2abs wasn't properly handling the case where both the base and link included a fragment/query string. In this case, the resulting URL would include the fragment/query string from both the base URL and link.

rel2abs has been replaced with an implementation that closely follows the method outlined in RFC 3986 section 5.2 for converting a relative URI to an absolute one, given a known base URI.

Example

Base: https://example.org?key=value Relative link: ?key2=value2 Previous result: https://example.org?key=value?key2=value2 Correct result: https://example.org?key2=value2

dugite-code commented 6 years ago

Thank you for your contribution