Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pabo opened this issue May 8, 2024 · 0 comments
Open

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

pabo opened this issue May 8, 2024 · 0 comments

Comments

@pabo
Copy link

pabo commented May 8, 2024

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?

antoniosanct added a commit to antoniosanct/rome that referenced this issue May 10, 2024
Signed-off-by: Antonio <antoniosanct@gmail.com>
antoniosanct added a commit to antoniosanct/rome that referenced this issue May 11, 2024
Signed-off-by: Antonio <antoniosanct@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant