Skip to content

Atom feed does not specify the "type" attribute on content elements #285

Description

@hartez

When generating an Atom feed, the <content> element does not include a type attribute. Because the attribute it missing, readers (per the spec) treat the content as plain text, which means all the markup is displayed in the feed reader (rather than being rendered as HTML).

In other words, my generated Atom feed has entries with content that looks like

<content>&lt;p&gt;The other day I was reading...

when they should look like

<content type="html">&lt;p&gt;The other day I was reading...

It looks like IFeedItem doesn't include any way to specify a content type, so this might be tricky to fix. Perhaps an additional setting like "AtomFeedContentType" that could be read by the AtomFeed class and passed into the AtomEntry constructor? Or possibly AtomEntry could try to auto-detect the content type, but that seems like an edge case nightmare.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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