diff options
-rw-r--r-- | fetcher/feedfetcher.php | 2 | ||||
-rw-r--r-- | tests/unit/fetcher/FeedFetcherTest.php | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index 64ab73d68..fc9f4eae6 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -82,6 +82,8 @@ class FeedFetcher implements IFeedFetcher { $simplePie = $this->simplePieFactory->getCore(); $simplePie->set_feed_url($url); $simplePie->enable_cache(true); + $simplePie->set_stupidly_fast(true); // disable simple pie sanitation + // we use htmlpurifier $simplePie->set_timeout($this->fetchTimeout); $simplePie->set_cache_location($this->cacheDirectory); $simplePie->set_cache_duration($this->cacheDuration); diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php index b9f68fdae..da7348fc9 100644 --- a/tests/unit/fetcher/FeedFetcherTest.php +++ b/tests/unit/fetcher/FeedFetcherTest.php @@ -141,6 +141,9 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { ->method('set_cache_location') ->with($this->equalTo($this->cacheDirectory)); $this->core->expects($this->once()) + ->method('set_stupidly_fast') + ->with($this->equalTo(true)); + $this->core->expects($this->once()) ->method('set_cache_duration') ->with($this->equalTo($this->cacheDuration)); $this->setExpectedException('\OCA\News\Fetcher\FetcherException'); |