Skip to content

A free, self-hostable news aggregator…

Bug feed name with special chars

Alexandre Alapetite5bf511c00f49
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('<' => '&lt;', '>' => '&gt;', '"' => '&quot;')); //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()));