aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-01-22 21:56:54 +0100
committerGravatar GitHub <noreply@github.com> 2021-01-22 21:56:54 +0100
commitd061e63fa5cd5414542eee47fda6ee596b8561dd (patch)
treeb0662d685f0bc958a72f91eb9255f32a98aaec6e /p/api
parent2981714f1506fab937d037857e698fb61e1e2b49 (diff)
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
Diffstat (limited to 'p/api')
-rw-r--r--p/api/greader.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index f93540285..5c0e754bd 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -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)),
),