mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-06 07:28:29 -05:00
CSS selector trim (#6428)
fix https://github.com/FreshRSS/FreshRSS/pull/6426#issuecomment-2091159868
This commit is contained in:
committed by
GitHub
parent
44625eed25
commit
fd7157e40c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user