Skip to content

A free, self-hostable news aggregator…

GReader API add canonical information (#3391)

Alexandre Alapetited061e63fa5cd
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)),
),