aboutsummaryrefslogtreecommitdiff
path: root/p/api/fever.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-02-05 09:30:18 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-02-05 09:30:18 +0100
commitce62ce0ebd562781307d137141e38338882f89ab (patch)
tree9efba44af399d43293b71d13e13f9d895bf907da /p/api/fever.php
parente4224eee2ee8ebc96db34fb70ac225880911477d (diff)
Fever API encoding of special chars
https://github.com/FreshRSS/FreshRSS/issues/2241
Diffstat (limited to 'p/api/fever.php')
-rw-r--r--p/api/fever.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/p/api/fever.php b/p/api/fever.php
index dd54a372b..d315523c4 100644
--- a/p/api/fever.php
+++ b/p/api/fever.php
@@ -324,9 +324,9 @@ class FeverAPI
$feeds[] = array(
'id' => $feed->id(),
'favicon_id' => $feed->id(),
- 'title' => $feed->name(),
- 'url' => $feed->url(),
- 'site_url' => $feed->website(),
+ 'title' => escapeToUnicodeAlternative($feed->name(), true),
+ 'url' => htmlspecialchars_decode($feed->url(), ENT_QUOTES),
+ 'site_url' => htmlspecialchars_decode($feed->website(), ENT_QUOTES),
'is_spark' => 0, // unsupported
'last_updated_on_time' => $feed->lastUpdate(),
);
@@ -349,7 +349,7 @@ class FeverAPI
foreach ($categories as $category) {
$groups[] = array(
'id' => $category->id(),
- 'title' => $category->name(),
+ 'title' => escapeToUnicodeAlternative($category->name(), false),
);
}
@@ -535,10 +535,10 @@ class FeverAPI
$items[] = array(
'id' => $entry->id(),
'feed_id' => $entry->feed(false),
- 'title' => $entry->title(),
- 'author' => $entry->authors(true),
+ 'title' => escapeToUnicodeAlternative($entry->title(), true),
+ 'author' => escapeToUnicodeAlternative($entry->authors(true), true),
'html' => $entry->content(),
- 'url' => $entry->link(),
+ 'url' => htmlspecialchars_decode($entry->link(), ENT_QUOTES),
'is_saved' => $entry->isFavorite() ? 1 : 0,
'is_read' => $entry->isRead() ? 1 : 0,
'created_on_time' => $entry->date(true),