diff --git a/controllers/front/SearchController.php b/controllers/front/SearchController.php index 3d8a02648..869b45ec2 100644 --- a/controllers/front/SearchController.php +++ b/controllers/front/SearchController.php @@ -91,6 +91,7 @@ class SearchControllerCore extends FrontController $this->productSort(); $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); + $original_query = Tools::safeOutput($query); $query = Tools::replaceAccentedChars(urldecode($query)); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); foreach ($search['result'] as &$product) @@ -105,7 +106,7 @@ class SearchControllerCore extends FrontController 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module 'search_products' => $search['result'], 'nbProducts' => $search['total'], - 'search_query' => $query, + 'search_query' => $original_query, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); } elseif (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag))