From 4c355ba3083ded7a2d621baa42c1233a46cd51dd Mon Sep 17 00:00:00 2001 From: Dag Date: Tue, 20 Feb 2024 19:32:31 +0100 Subject: [PATCH] fix(FilterBridge): trim title so that regex filter works as expected (#3989) The fix is in FeedParser, so this fixes all usages of FeedParser where title is now trimmed. fix #3985 --- lib/FeedParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/FeedParser.php b/lib/FeedParser.php index 37d3005b..b774cc14 100644 --- a/lib/FeedParser.php +++ b/lib/FeedParser.php @@ -92,7 +92,7 @@ final class FeedParser $item['uri'] = (string)$feedItem->id; } if (isset($feedItem->title)) { - $item['title'] = html_entity_decode((string)$feedItem->title); + $item['title'] = trim(html_entity_decode((string)$feedItem->title)); } if (isset($feedItem->updated)) { $item['timestamp'] = strtotime((string)$feedItem->updated); @@ -154,7 +154,7 @@ final class FeedParser $item['uri'] = (string)$feedItem->link; } if (isset($feedItem->title)) { - $item['title'] = html_entity_decode((string)$feedItem->title); + $item['title'] = trim(html_entity_decode((string)$feedItem->title)); } if (isset($feedItem->description)) { $item['content'] = (string)$feedItem->description;