Get content:encoded of item if available (#565)

Get content:encoded of item if available fixes #564

Signed-off-by: brunob <bruno@eliaz.fr>
This commit is contained in:
b_b 2019-11-16 14:21:40 +01:00 committed by Benjamin Brahmer
parent 7664983334
commit 35c6c91e26
2 changed files with 3 additions and 3 deletions

View File

@ -198,7 +198,7 @@ class FeedFetcher implements IFeedFetcher
}
// purification is done in the service layer
$body = $parsedItem->getDescription();
$body = $parsedItem->getValue("content:encoded") ?? $parsedItem->getDescription();
$body = mb_convert_encoding(
$body,
'HTML-ENTITIES',

View File

@ -405,7 +405,7 @@ class FeedFetcherTest extends TestCase
$this->createFeed('he-IL');
$this->createItem();
$this->item_mock->expects($this->exactly(2))
$this->item_mock->expects($this->exactly(3))
->method('getValue')
->will(
$this->returnValueMap(
@ -431,7 +431,7 @@ class FeedFetcherTest extends TestCase
$this->createFeed('he-IL');
$this->createItem();
$this->item_mock->expects($this->exactly(3))
$this->item_mock->expects($this->exactly(4))
->method('getValue')
->will(
$this->returnValueMap(