Fix issue in showing search results

If the search text contains special regex chars, a php warning is
raised. This edit fixes that.
Merge pull request #978 from mlocati/patch-66

Fix issue in showing search results