A free, self-hostable news aggregator…
Remove noise parameters in query URL (#6371)
Alexandre Alapetite5e66adcc5144
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.phpindex 4fd9a2f28..d766aa97d 100644--- a/app/Controllers/configureController.php+++ b/app/Controllers/configureController.php@@ -374,7 +374,6 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {if ('' === $name) {$name = _t('conf.query.number', $id + 1);}- $queryParams['name'] = $name;if (!empty($params['get']) && is_string($params['get'])) {$queryParams['get'] = htmlspecialchars_decode($params['get'], ENT_QUOTES);}@@ -399,6 +398,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {$queryParams['shareOpml'] = (bool)$params['shareOpml'];}$queryParams['url'] = Minz_Url::display(['params' => $queryParams]);+ $queryParams['name'] = $name;$queries = FreshRSS_Context::userConf()->queries;$queries[$id] = (new FreshRSS_UserQuery($queryParams, FreshRSS_Context::categories(), FreshRSS_Context::labels()))->toArray();@@ -442,6 +442,7 @@ class FreshRSS_configure_Controller extends FreshRSS_ActionController {$queries[$key] = (new FreshRSS_UserQuery($query, FreshRSS_Context::categories(), FreshRSS_Context::labels()))->toArray();}$params = $_GET;+ unset($params['name']);unset($params['rid']);$params['url'] = Minz_Url::display(['params' => $params]);$params['name'] = _t('conf.query.number', count($queries) + 1);diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.phpindex 898ffa3bc..692738107 100644--- a/app/Models/BooleanSearch.php+++ b/app/Models/BooleanSearch.php@@ -50,7 +50,6 @@ class FreshRSS_BooleanSearch {$all_matches = [];if (preg_match_all('/\bsearch:(?P<delim>[\'"])(?P<search>.*)(?P=delim)/U', $input, $matchesFound)) {$all_matches[] = $matchesFound;-}if (preg_match_all('/\bsearch:(?P<search>[^\s"]*)/', $input, $matchesFound)) {$all_matches[] = $matchesFound;