pear/XML_Feed_Parser — pull request #2 by serenecloud (2011-11-29 22:42:17+00:00)
Title: atom:link causes getLink to fail for RSS2.php

Hi,

I submitted a but to https://pear.php.net/bugs/bug.php?id=16416 a long time ago for this bug. Recently meldra messaged me asking if I could bring it into github, so here it is.

Original bug description:

"The RSS 2.0 spec specifies that you should use however some sites such as http://workbench.cadenhead.org/news/3284/adding-atomlink-your-rss-feed recommend adding also.

getElementsByTagName will return both these links when searching for 'link'. If the atom:link is first then $link->nodeValue is an empty string and this eventually calls combineBases passing $element->baseURI (which in my case ends up being the folder of the file)

An example of the kind of feed that can trigger this is http://blog.mudrak.name/feed/?tag=mahara

I have attached a diff of my change to fix this issue using xpath to only match and not (or any other namespaced link attributes)."

Thanks