Explorar o código

Bug feed name with special chars

https://github.com/marienfressinaud/FreshRSS/issues/462
Alexandre Alapetite %!s(int64=12) %!d(string=hai) anos
pai
achega
5bf511c00f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Models/Feed.php

+ 2 - 2
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()));