Commit 64fd0805 authored by Darryl Hamilton's avatar Darryl Hamilton
Browse files

Use XPath to find <link> elements (ignore atom:link) (bug #750815)

(cherry picked from commit e662d5d9

)

Change-Id: I9b7277d7776278a93d90063b5877209244387102
Signed-off-by: default avatarDarryl Hamilton <darrylh@catalyst.net.nz>
parent 86876df5
......@@ -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;
......
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