Alexandre Alapetite
2024-05-02 20:36:08 +02:00
committed by GitHub
parent 44625eed25
commit fd7157e40c

View File

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