VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: stawebnice on November 27, 2020, 12:21:41 PM

Title: Virtuemart Search = queries containing &
Post by: stawebnice on November 27, 2020, 12:21:41 PM
Hi guys, we have discovered two bugs in VM search

1. when you search a term that contains & it makes problems when you go to another page of search results

while first page includes the search term: keyword=N%26D

next page has eshop/results,10-15?keyword=N&D

so it treats & as  parameters separator

and the search is cancelled because suddenly you have 7313 results instead of original 39

2. and also, when you want to refine the search on search results page and enter anything into search box, it finds nothing, it does not reset the search

you can try it here> https://www.grandom.cz (https://www.grandom.cz) and search for N&D

first page is ok, second page of results has a problem

Title: Re: Virtuemart Search = queries containing &
Post by: pinochico on November 27, 2020, 12:40:10 PM
Hello Petro,

use override template and for result use php function htmlspecialchars - https://www.php.net/manual/en/function.htmlspecialchars.php