docbrown/app/services/feeds
Daniel Uber 64568d3a3d
Use the rss item's url when handling relative image links (#15497)
* Use the feed source url when the feed url (from links) is empty

This probably should just be using @feed_source_url always to make a
base path for absolute paths without a hostname, rather than expecting
this from the feed.

An example why we should not be using @feed.url would be
individual posts at domain/slug but the "index" page at
domain/blog (with a generic screen on /), and images hosted from
/assets/ without /blog/ anywhere in the asset path.

Partial fix for #15488

* Use item.url as base_url for relative links

It's possible the rss feed and the contained articles are served from
separate hosts/subdomains/paths. Don't assume the entries are related
to the feed or the feed_source_url, use the item's url for relative
links in that item.

* Update failing spec to add url to item double
2021-12-09 14:08:54 -06:00
..
assemble_article_markdown.rb Use the rss item's url when handling relative image links (#15497) 2021-12-09 14:08:54 -06:00
check_item_medium_reply.rb Refactor RssReader and Feeds::Import common parts: take 1 (#11412) 2020-11-18 14:17:53 +01:00
check_item_previously_imported.rb Refactor RssReader and Feeds::Import common parts: take 1 (#11412) 2020-11-18 14:17:53 +01:00
clean_html.rb Move HtmlCleaner from app/labor into service (#11609) 2020-11-27 08:21:57 +07:00
import.rb Spelling (#15702) 2021-12-07 06:59:10 -07:00
validate_url.rb Add missing features to new feed importer (#11501) 2020-11-24 18:11:13 +01:00