diff --git a/src/FeedIo/Reader.php b/src/FeedIo/Reader.php index f9f77f88..f999a82b 100644 --- a/src/FeedIo/Reader.php +++ b/src/FeedIo/Reader.php @@ -67,7 +67,7 @@ public function addParser(Parser $parser) /** * adds a filter to every parsers - * + * * @param \FeedIo\FilterInterface $filter * @return $this */ @@ -76,7 +76,7 @@ public function addFilter(FilterInterface $filter) foreach ($this->parsers as $parser) { $parser->addFilter($filter); } - + return $this; } @@ -135,7 +135,7 @@ public function read($url, FeedInterface $feed, \DateTime $modifiedSince = null) $response = $this->client->getResponse($url, $modifiedSince); $this->logger->debug("response ok, now turning it into a DomDocument"); - $document = $this->loadDocument($response->getBody()); + $document = $this->loadDocument(trim($response->getBody())); $this->parseDocument($document, $feed); $this->logger->info("{$url} successfully parsed");