Unknown/unsupported feed type with default xmlns



I’ve just encountered an error when adding feeds that have default xmlns.

In particular these 2 feeds


give me

fetch error: Unknown/unsupported feed type

Both via latest tt-rss from git (3b8d9bc6) and https://fakecake.org/myfeedsucks

Quick experiment showed that they both have default namespace (xmlns=“uri”) defined like:
<rss xmlns="http://backend.userland.com/rss2" xmlns:yandex="http://news.yandex.ru" version="2.0">

And if it’s deleted, the feed is parsed without errors.
That http://backend.userland.com/rss2 leads to https://cyber.harvard.edu/rss/rss.html through 7 (ouch) 301-302 redirects, but putting final destination into xmlns still gives the same error.

tt-rss version (including git commit id):
tt-rss git (3b8d9bc6)

Platform (i.e. Linux distro, PHP, PostgreSQL, etc) versions:
Gentoo x86_64, PHP7.0.21, Mariadb10.1.24

P.S. I’m sorry for this hack with URLs, but it would not let me post this otherwise and I do believe they’re relevant in this case, even if not rendered as hyperlinks.


<rss xmlns="http://backend.userland.com/rss2"

i’m no expert in xml but i’m fairly certain you shouldn’t do that

e: feedvalidator seems to agree with me on this


Perhaps, but those are feeds from rather large news portals (not mine, I only use them) and I’m not sure how to convince them it’s a problem on their side.
According to https://en.wikipedia.org/wiki/XML_namespace#Namespace_declaration and https://www.w3schools.com/XML/xml_namespaces.asp (first things that pop up if you look for “xml default namespace” — it is to be considered default namespace for xml and is valid.

Those feeds are also parsed without errors by Akregator and Thunderbird.


oh i’m sure xml documents are allowed to have default namespaces, the problem seems to be that “rss” is not a valid one

the usual way of dealing with this kinda stuff is plugins, you can make one and post it on github or something. i’m sure it should be possible to remove default namespace from the document using some DOMDocument hackery.