Fix CSS selector preview (#6423)

fix https://github.com/FreshRSS/FreshRSS/issues/6266

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
This commit is contained in:
Alexandre Alapetite
2024-05-02 14:13:15 +02:00
committed by GitHub
parent 617f9a7fa6
commit 0e6f56bb4c

View File

@@ -1121,7 +1121,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$feed_id = Minz_Request::paramInt('id');
$content_selector = Minz_Request::paramString('selector');
if (!$content_selector) {
if ($content_selector === '') {
$this->view->fatalError = _t('feedback.sub.feed.selector_preview.selector_empty');
return;
}
@@ -1143,11 +1143,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
//Get feed.
$feed = $entry->feed();
if ($feed === null) {
$this->view->fatalError = _t('feedback.sub.feed.selector_preview.no_feed');
return;
}
$feed->_pathEntries($content_selector);
//Fetch & select content.
try {