Commit e662d5d9 authored by Ben Bradshaw's avatar Ben Bradshaw
Browse files

[#3195] Use XPath to find <link> elements (ignore atom:link)

(cherry picked from commit f454e903ae32f109d47d753c43375ec56b4950a7)
parent e4f6b75f
......@@ -321,7 +321,8 @@ class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type
*/
function getLink($offset, $attribute = 'href', $params = array())
{
$links = $this->model->getElementsByTagName('link');
$xPath = new DOMXPath($this->model);
$links = $xPath->query('//link');
if ($links->length <= $offset) {
return false;
......@@ -331,4 +332,4 @@ class XML_Feed_Parser_RSS2 extends XML_Feed_Parser_Type
}
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment