diff options
Diffstat (limited to 'p/api')
| -rw-r--r-- | p/api/.htaccess | 2 | ||||
| -rw-r--r-- | p/api/fever.php | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/p/api/.htaccess b/p/api/.htaccess index 937983ec9..2bd6b1d14 100644 --- a/p/api/.htaccess +++ b/p/api/.htaccess @@ -1,5 +1,5 @@ <IfModule mod_setenvif.c> - SetEnvIf "^Authorization$" "(.*)" HTTP_AUTHORIZATION=$1 + SetEnvIfNoCase "^Authorization$" "(.*)" HTTP_AUTHORIZATION=$1 </IfModule> <IfModule !mod_setenvif.c> <IfModule mod_rewrite.c> diff --git a/p/api/fever.php b/p/api/fever.php index dd54a372b..b81646928 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(), true), ); } @@ -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(), false), + 'author' => escapeToUnicodeAlternative(trim($entry->authors(true), '; '), false), '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), |
