Skip to content

RSS feeds.Item.id is not a valid URL and is not isPermalink=false #28734

Closed
@beaucollins

Description

@beaucollins

Description

When creating the RSS feed for releases, the Item.id is set to a db ID value with the url concatenated. Example:

      <guid>316519: https://gitea.com/owner/repo/releases/tag/v2.4.1rc1</guid>

Id: fmt.Sprintf("%v: %v", strconv.FormatInt(rel.ID, 10), link.Href),

The RSS 2 standard states:

guid stands for globally unique identifier. It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.

There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.

If the guid element has an attribute named isPermaLink with a value of true, the reader may assume that it is a permalink to the item, that is, a url that can be opened in a Web browser, that points to the full item described by the element. An example:

isPermaLink is optional, its default value is true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.

https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt

And since the default value of true indicates this is a valid URL gitea should provide a valid URL or set isPermalink="false".

Gitea's behavior of providing an invalid URL and leaving out the isPermalink="false" it breaks some feed readers that expect the <guid> to abide by the RSS 2.0 specification.

Gitea Version

1.22.0+dev-522-ga04f8c0f8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

https://gitea.com/

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions