Skip to content

When feed level links are relative the baseUrl option is not applied #135

@WetHat

Description

@WetHat

The attached feed uses relative links like so (see also the attached feed XML). The feed level link looks like this:

<link>/blog/</link>

The feed extractor returns this link as is, and does not use the baseUrl property provided with parsing options. While using relative links in RSS feed is highly questionable, the extractor should use the baseUrl on the feed level too.

This issue can be worked around by providing custom processing like so:

if (link) {
    this.site = link.startsWith("/") && options.baseUrl ? options.baseUrl + link : link;
}

feed.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions