Repository navigation
Parser: treat https Atom 1.0 namespace as Atom - #1010
Merged
Merged
Conversation
jtojnar
reviewed
Oct 29, 2026
Member
I think yes. IMO, the purpose of SimplePie is to provide an abstraction representing all things feed, guided by Postel’s law. What it should not do is be a HTTP client or a sanitizer since other projects already do this much better. But since we care about backwards compatibility, we cannot just drop those parts. |
Alkarex
added a commit
to FreshRSS/FreshRSS
that referenced
this pull request
Nov 14, 2026
In particular: * File,Psr18Client: Remove support for local files simplepie/simplepie#994 * Parser: ignore whitespace before the XML declaration simplepie/simplepie#1005 * Require PHP 7.4 or newer simplepie/simplepie#1006, simplepie/simplepie#992 * Parser: treat https Atom 1.0 namespace as Atom simplepie/simplepie#1010
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes feeds that declare
xmlns="https://www.w3.org/2005/Atom"parse as Atom 1.0. Fixes #746.It follows the "map multiple known URIs to the same namespace" option from the discussion, the same way the Media RSS namespace variants are already normalised in
Parser::split_ns(). A newNAMESPACE_ATOM_10_WRONGconstant holds the https form. Feeds with the correct namespace are unaffected. A live example is ele-king.net/atom.xml: master reports that no feed could be found, and with this change it parses, 15 items when I checked.This changes default behaviour in one more case: the normalisation applies to any element in the https namespace, not only the root. An RSS 2.0 feed that declares
xmlns:atom="https://www.w3.org/2005/Atom"now exposes itsatom:linkelements, soget_link(0, 'self')andget_link(0, 'hub')return the self and hub URLs where master returns null. I checked this with a small RSS feed against master and the branch.The new test in
SimplePieTestparses an Atom feed with the https namespace and fails on master.It would be good to have a maintainer's view on whether SimplePie should accept the https form at all, and whether a constant is the preferred way to express it.