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
This commit is contained in:
Dag 2024-02-20 19:32:31 +01:00 committed by GitHub
parent 35f6e62e45
commit 4c355ba308
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;