docbrown/spec/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_spec.rb Use the rss item's url when handling relative image links (#15497) 2021-12-09 14:08:54 -06:00
clean_html_spec.rb Move HtmlCleaner from app/labor into service (#11609) 2020-11-27 08:21:57 +07:00
import_spec.rb Record cassette to import feed from rss for two users (#14788) 2021-09-21 15:44:15 -05:00
validate_url_spec.rb Add missing features to new feed importer (#11501) 2020-11-24 18:11:13 +01:00