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:
parent
7664983334
commit
35c6c91e26
|
@ -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',
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue