From 5a6ea11dda42cfa16c7b602b6a36d34d868b36fb Mon Sep 17 00:00:00 2001 From: Julien Boulen Date: Wed, 17 May 2023 16:29:38 +0200 Subject: [PATCH] MDL-77986 backup: trim extra white spaces on search forms --- backup/util/ui/restore_ui_components.php | 1 + 1 file changed, 1 insertion(+) diff --git a/backup/util/ui/restore_ui_components.php b/backup/util/ui/restore_ui_components.php index 875b511fd7c..ff0a31f53f1 100644 --- a/backup/util/ui/restore_ui_components.php +++ b/backup/util/ui/restore_ui_components.php @@ -85,6 +85,7 @@ abstract class restore_search_base implements renderable { public function __construct(array $config = array()) { $this->search = optional_param($this->get_varsearch(), self::DEFAULT_SEARCH, PARAM_NOTAGS); + $this->search = trim($this->search); $this->maxresults = get_config('backup', 'import_general_maxresults'); foreach ($config as $name => $value) {