GReader API add canonical information (#3391)

For fluent-reader
#fix https://github.com/FreshRSS/FreshRSS/issues/3389
Better compatibility InoReader
https://www.inoreader.com/developers/stream-contents
This commit is contained in:
Alexandre Alapetite
2021-01-22 21:56:54 +01:00
committed by GitHub
parent 2981714f15
commit d061e63fa5

View File

@@ -507,6 +507,9 @@ function entriesToArray($entries) {
'published' => $entry->date(true),
'title' => escapeToUnicodeAlternative($entry->title(), false),
'summary' => array('content' => $entry->content()),
'canonical' => array(
array('href' => htmlspecialchars_decode($entry->link(), ENT_QUOTES)),
),
'alternate' => array(
array('href' => htmlspecialchars_decode($entry->link(), ENT_QUOTES)),
),