Also html decode the links to the page to not break on nyaa torrents

This commit is contained in:
Bernhard Posselt 2013-05-25 03:28:51 +02:00
Родитель 2b5e3372ca
Коммит b12e151bcd
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,6 @@
ownCloud-news (0.104)
* Also html decode the links to the page to not break on nyaa torrents
ownCloud-news (0.103)
* Fixed a bug that prevented deleting feeds when a folder was deleted

Просмотреть файл

@ -111,10 +111,11 @@ class FeedFetcher implements IFeedFetcher {
$item = new Item();
$item->setStatus(0);
$item->setUnread();
$item->setUrl($simplePieItem->get_permalink());
$item->setUrl(html_entity_decode($simplePieItem->get_permalink(),
ENT_COMPAT, 'UTF-8'));
// unescape content because angularjs helps against XSS
$item->setTitle(html_entity_decode($simplePieItem->get_title()),
ENT_COMPAT, 'UTF-8' );
$item->setTitle(html_entity_decode($simplePieItem->get_title(),
ENT_COMPAT, 'UTF-8'));
$guid = $simplePieItem->get_id();
$item->setGuid($guid);
$item->setGuidHash(md5($guid));