mmcdole / gofeed

Parse RSS, Atom and JSON feeds in Go
MIT License
2.51k stars 204 forks source link

accept empty xml space for content:encoded #211

Closed JLugagne closed 4 months ago

JLugagne commented 11 months ago

in some cases, the space is empty to use the tag namespace as default. To manage this I have added an OR conditions in rss/parser.go.

Alternative: improve goxpp to use tag namespace as xmlns default if empty ?

mmcdole commented 11 months ago

@JLugagne Can you show a quick example of this? I think I understand, but want to be completely sure.

It sounds like this might be better to be fixed in goxpp, but I'd like to make sure I grok what the issue is.

JLugagne commented 11 months ago

Sure, one of the RSS feed I had to use was having xmlns:content in the root tag but in the tag it was defining only the xmlns attribute (you can check the unit test I have added). In that case I guess that it means xmlns refer to the namespace of the tag?

mmcdole commented 4 months ago

This should be fixed with #223, so closing. Thank you @JLugagne !