From 670ee57b6288549ac611d53d86d8f5ffee641b0e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 Mar 2014 20:16:10 +0100 Subject: Interface to enable/disable API and unsafe automatic login https://github.com/marienfressinaud/FreshRSS/issues/13 https://github.com/marienfressinaud/FreshRSS/issues/440 --- app/Models/Feed.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 73f9c32fb..bce3bd24f 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -254,11 +254,12 @@ class FreshRSS_Feed extends Minz_Model { $elinks = array(); foreach ($item->get_enclosures() as $enclosure) { $elink = $enclosure->get_link(); - if (array_key_exists($elink, $elinks)) continue; - $elinks[$elink] = '1'; - $mime = strtolower($enclosure->get_type()); - if (strpos($mime, 'image/') === 0) { - $content .= '
'; + if (empty($elinks[$elink])) { + $elinks[$elink] = '1'; + $mime = strtolower($enclosure->get_type()); + if (strpos($mime, 'image/') === 0) { + $content .= '
'; + } } } -- cgit v1.2.3 From 5bf511c00f49eb9fd066fb903489e43529dd8338 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 16 Mar 2014 21:15:23 +0100 Subject: Bug feed name with special chars https://github.com/marienfressinaud/FreshRSS/issues/462 --- app/Models/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index bce3bd24f..13d3dfe88 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -210,8 +210,8 @@ class FreshRSS_Feed extends Minz_Model { } if ($loadDetails) { - $title = htmlspecialchars(html_only_entity_decode($feed->get_title()), ENT_COMPAT, 'UTF-8'); - $this->_name ($title === null ? $this->url : $title); + $title = strtr(html_only_entity_decode($feed->get_title()), array('<' => '<', '>' => '>', '"' => '"')); //HTML to HTML-PRE //ENT_COMPAT except & + $this->_name ($title == '' ? $this->url : $title); $this->_website(html_only_entity_decode($feed->get_link())); $this->_description(html_only_entity_decode($feed->get_description())); -- cgit v1.2.3 From 7f1c305c869ee315131b7ade7abc99f23106d95b Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 13 May 2014 22:30:24 +0200 Subject: Add audio control for podcasts https://github.com/marienfressinaud/FreshRSS/issues/504 --- app/Models/Feed.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 13d3dfe88..116f96562 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -259,6 +259,8 @@ class FreshRSS_Feed extends Minz_Model { $mime = strtolower($enclosure->get_type()); if (strpos($mime, 'image/') === 0) { $content .= '
'; + } elseif (strpos($mime, 'audio/') === 0) { + $content .= '