Просмотр исходного кода

Merge pull request #1615 from Alkarex/author_sanitize

Author HTML to text
Alexandre Alapetite 8 лет назад
Родитель
Сommit
19df77c249
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 1
      CHANGELOG.md
  2. 1 1
      app/Models/Feed.php

+ 2 - 1
CHANGELOG.md

@@ -9,7 +9,8 @@
 * Bug fixing
 	* PHP 7.1 compatibility for the API [#1584](https://github.com/FreshRSS/FreshRSS/issues/1584), [#1594](https://github.com/FreshRSS/FreshRSS/pull/1594)
 	* Fix API compatibility bug between PostgreSQL and EasyRSS [#1603](https://github.com/FreshRSS/FreshRSS/pull/1603)
-	* Fix PostgreSQL error when adding new entries [#1610](https://github.com/FreshRSS/FreshRSS/issues/1610), [#1613](https://github.com/FreshRSS/FreshRSS/pull/1613)
+	* Fix PostgreSQL error when adding entries with duplicated GUID [#1610](https://github.com/FreshRSS/FreshRSS/issues/1610)
+	* Fix for RSS feeds containing HTML in author field [#1590](https://github.com/FreshRSS/FreshRSS/issues/1590)
 * Misc.
 	* Allow longer database usernames [#1597](https://github.com/FreshRSS/FreshRSS/issues/1597)
 

+ 1 - 1
app/Models/Feed.php

@@ -339,7 +339,7 @@ class FreshRSS_Feed extends Minz_Model {
 				$this->id(),
 				$item->get_id(false, false),
 				$title === null ? '' : $title,
-				$author === null ? '' : html_only_entity_decode($author->name),
+				$author === null ? '' : html_only_entity_decode(strip_tags($author->name)),
 				$content === null ? '' : $content,
 				$link === null ? '' : $link,
 				$date ? $date : time()