Browse Source

Fix CSS selector preview (#6423)

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

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Alexandre Alapetite 1 year ago
parent
commit
0e6f56bb4c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Controllers/feedController.php

+ 2 - 2
app/Controllers/feedController.php

@@ -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 {