Permalink
Browse files

Set sanitizer before work in constructor

  • Loading branch information...
1 parent 99e7d34 commit fe6bab8dda38ca6b1a8e716cd6d87a5331d19485 @CloCkWeRX CloCkWeRX committed Dec 9, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 XML/Feed/Parser/AtomElement.php
@@ -90,12 +90,14 @@ class XML_Feed_Parser_AtomElement extends XML_Feed_Parser_Atom
*/
function __construct(DOMElement $element, $parent, $xmlBase = '')
{
+ $this->setSanitizer(new XML_Feed_Parser_Unsafe_Sanitizer());
$this->model = $element;
$this->parent = $parent;
$this->xmlBase = $xmlBase;
+ // $this->id is doing magic work in the constructor :(
$this->xpathPrefix = "//atom:entry[atom:id='" . $this->id . "']/";
$this->xpath = $this->parent->xpath;
- $this->setSanitizer(new XML_Feed_Parser_Unsafe_Sanitizer());
+
}
/**
@@ -199,6 +201,7 @@ protected function getContent($method, $arguments = array())
*/
function getEnclosure($method, $arguments = array())
{
+
$offset = isset($arguments[0]) ? $arguments[0] : 0;
$query = "//atom:entry[atom:id='" . $this->getText('id', false) .
"']/atom:link[@rel='enclosure']";

0 comments on commit fe6bab8

Please sign in to comment.