A free, self-hostable news aggregator…
Fix XPath for HTML documents with broken root (#6774)
Alexandre Alapetite91d0e5099bad
diff --git a/app/Models/Entry.php b/app/Models/Entry.phpindex cd7b27291..f2701fb68 100644--- a/app/Models/Entry.php+++ b/app/Models/Entry.php@@ -785,7 +785,7 @@ HTML;$content = '';$cssSelector = htmlspecialchars_decode($feed->pathEntries(), ENT_QUOTES);$cssSelector = trim($cssSelector, ', ');- $nodes = $xpath->query((new Gt\CssXPath\Translator($cssSelector))->asXPath());+ $nodes = $xpath->query((new Gt\CssXPath\Translator($cssSelector, '//'))->asXPath());if ($nodes != false) {$path_entries_filter = $feed->attributeString('path_entries_filter') ?? '';$path_entries_filter = trim($path_entries_filter, ', ');