rss-bridge icon indicating copy to clipboard operation
rss-bridge copied to clipboard

JavaScript function remove_www_from_url breaks URLs on frontpage

Open cstuder opened this issue 9 months ago • 0 comments

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.

cstuder avatar May 23 '24 06:05 cstuder