RSS-Bridge / rss-bridge

The RSS feed for websites missing it
https://rss-bridge.org/bridge01/
The Unlicense
7.23k stars 1.03k forks source link

JavaScript function remove_www_from_url breaks URLs on frontpage #4114

Closed cstuder closed 3 months ago

cstuder commented 4 months ago

Describe the bug In rss-bridge.js#L17 every bridges URL which begins with www. gets shortened by the function remove_www_from_url() which is called from the rssbridge_list_search() event handler. This breaks some URLs where the remote server can't handle the shortened version. RSS-Bridge itself continues to function, but the link to the remote server is wrong.

To Reproduce

  1. Go to https://rss.existenz.ch/feeds/
  2. Click on "MeteoSwiss Blog" (Which points to https://meteoschweiz.admin.ch/ueber-uns/meteoschweiz-blog.html)
  3. Get an SSL_ERROR_BAD_CERT_DOMAIN error (Depending on your browser)

Expected behavior The link should point to the bridges configured $URI (In this case: https://www.meteoschweiz.admin.ch/ueber-uns/meteoschweiz-blog.html) (Source)

Additional context The remove_www_from_url() function modifies the URLs directly on the DOM a-objects. This is unnecessary in this place, unless I'm not following the code correctly.

Has been introduced in PR #2952.

dvikan commented 3 months ago

thanks for reporting bug

cstuder commented 3 months ago

Awesome, thank you for the fix.