Skip to content

xml:base not respected on <content> elements #689

@pabo

Description

@pabo

It appears that the xml:base attribute is only respected on the <feed> and <entry> elements. At least one atom feed I consume puts the xml base on <content> elements within <entry>'s

Example feed

<feed xmlns="http://www.w3.org/2005/Atom">
  <title>kottke.org</title>
  <link rel="alternate" type="text/html" href="http://kottke.org/"/>
  <link rel="self" type="application/atom+xml" href="http://feeds.kottke.org/main"/>
  ...
  <entry>
    ...
    <content type="html" xml:lang="en" xml:base="https://kottke.org/">
      ...
    </content>
  </entry>
</feed>

This has the effect of relative URLs within the content resolving incorrectly - in this case with base url of http://feeds.kottke.org/ instead of https://kottke.org/.

I don't know why the feed puts the base where it does, since it seems to always be static at the feed level. But is this a common enough thing to add support for here?

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