aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 10b37aa94..ca8d9c602 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -749,11 +749,13 @@ HTML;
$content = '';
$cssSelector = htmlspecialchars_decode($feed->pathEntries(), ENT_QUOTES);
+ $cssSelector = trim($cssSelector, ', ');
$nodes = $xpath->query((new Gt\CssXPath\Translator($cssSelector))->asXPath());
if ($nodes != false) {
- $path_entries_filter = $feed->attributeString('path_entries_filter');
+ $path_entries_filter = $feed->attributeString('path_entries_filter') ?? '';
+ $path_entries_filter = trim($path_entries_filter, ', ');
foreach ($nodes as $node) {
- if ($path_entries_filter != null) {
+ if ($path_entries_filter !== '') {
$filterednodes = $xpath->query((new Gt\CssXPath\Translator($path_entries_filter))->asXPath(), $node) ?: [];
foreach ($filterednodes as $filterednode) {
if ($filterednode->parentNode === null) {