From 272af0f3c44a4a90e05cf8b5b1972c0b22ece3ad Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 11 Dec 2024 23:23:50 +0100 Subject: Improved CSS filter (#7091) * Improved CSS filter Remove unwanted elements both before and after sanitizing fix https://github.com/FreshRSS/FreshRSS/issues/7084 Improved fix bug in https://github.com/FreshRSS/FreshRSS/commit/33fd07f6f26310d4806077cc87bcdf9b8b940e35#commitcomment-150152171 * fix typing --- app/Controllers/subscriptionController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 73680d9eb..b1b999a4a 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -299,7 +299,9 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { } } - $feed->_attribute('path_entries_conditions', Minz_Request::paramTextToArray('path_entries_conditions', plaintext: true)); + $conditions = Minz_Request::paramTextToArray('path_entries_conditions', plaintext: true); + $conditions = array_filter(array_map('trim', $conditions)); + $feed->_attribute('path_entries_conditions', empty($conditions) ? null : $conditions); $feed->_attribute('path_entries_filter', Minz_Request::paramString('path_entries_filter', true)); $values = [ -- cgit v1.2.3