Skip to content

[Bug] FreshRSS body scraper does not properly handle relative links #6991

@GiovanH

Description

@GiovanH

Describe the bug

FreshRSS tries to save a local HTML version of pages in the feed, but incorrectly handles urls with relative links. Specifically, it treats the referring page as the site domain rather than the actual location of the article.

To Reproduce

Feed: https://blog.thea.codes/feed.xml
Feed entry: https://blog.thea.codes/typefaces-i-love/ (No body)
Scraped with CSS Selector: article

Real HTML:

...
<img alt="Nunito specimen" src="./nunito.png">
...

FreshRSS scrape:

...
<img alt="Nunito specimen" src="https://blog.thea.codes/nunito.png">
...

Expected behavior

Correct scrape:

...
<img alt="Nunito specimen" src="https://blog.thea.codes/typefaces-i-love/nunito.png">
...

FreshRSS version

1.24.3

Environment information

  • Database version: [e.g. Mysql 5.7, SQLite]
  • PHP version: 8.2.20
  • Installation type: Docker

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions