Update of picoFeed for bugfix
This commit is contained in:
parent
6aa0aaa724
commit
58227aa091
@ -22,7 +22,7 @@ Router\before(function($action) {
|
||||
|
||||
if ($action !== 'login' && ! isset($_SESSION['user'])) {
|
||||
|
||||
PicoFarad\Response\redirect('?action=login');
|
||||
Response\redirect('?action=login');
|
||||
}
|
||||
|
||||
Response\csp(array(
|
||||
|
17
miniflux/vendor/PicoFeed/Filter.php
vendored
17
miniflux/vendor/PicoFeed/Filter.php
vendored
@ -55,8 +55,11 @@ class Filter
|
||||
'http://',
|
||||
'https://',
|
||||
'ftp://',
|
||||
'mailto://',
|
||||
'//'
|
||||
'mailto:',
|
||||
'//',
|
||||
'data:image/png;base64,',
|
||||
'data:image/gif;base64,',
|
||||
'data:image/jpg;base64,'
|
||||
);
|
||||
|
||||
public $protocol_attributes = array(
|
||||
@ -169,6 +172,14 @@ class Filter
|
||||
}
|
||||
else if ($this->isAllowedProtocol($value) && ! $this->isBlacklistMedia($value)) {
|
||||
|
||||
if ($attribute == 'src' &&
|
||||
isset($attributes['data-src']) &&
|
||||
$this->isAllowedProtocol($attributes['data-src']) &&
|
||||
! $this->isBlacklistMedia($attributes['data-src'])) {
|
||||
|
||||
$value = $attributes['data-src'];
|
||||
}
|
||||
|
||||
$attr_data .= ' '.$attribute.'="'.$value.'"';
|
||||
$used_attributes[] = $attribute;
|
||||
}
|
||||
@ -264,6 +275,8 @@ class Filter
|
||||
|
||||
public function isRelativePath($value)
|
||||
{
|
||||
if (strpos($value, 'data:') === 0) return false;
|
||||
|
||||
return strpos($value, '://') === false && strpos($value, '//') !== 0;
|
||||
}
|
||||
|
||||
|
19
miniflux/vendor/PicoFeed/Parsers/Rss20.php
vendored
19
miniflux/vendor/PicoFeed/Parsers/Rss20.php
vendored
@ -19,8 +19,25 @@ class Rss20 extends Parser
|
||||
|
||||
$namespaces = $xml->getNamespaces(true);
|
||||
|
||||
$this->title = (string) $xml->channel->title;
|
||||
if ($xml->channel->link->count() > 1) {
|
||||
|
||||
foreach ($xml->channel->link as $xml_link) {
|
||||
|
||||
$link = (string) $xml_link;
|
||||
|
||||
if ($link !== '') {
|
||||
|
||||
$this->url = (string) $link;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
$this->url = (string) $xml->channel->link;
|
||||
}
|
||||
|
||||
$this->title = (string) $xml->channel->title;
|
||||
$this->id = $this->url;
|
||||
$this->updated = isset($xml->channel->pubDate) ? (string) $xml->channel->pubDate : (string) $xml->channel->lastBuildDate;
|
||||
$this->updated = $this->updated ? strtotime($this->updated) : time();
|
||||
|
Loading…
Reference in New Issue
Block a user