Fix highlighting of search results

The regular expression that looks for matches should be escaped
(for instance $highlight may contains dots or asterisks or '#').
Merge pull request #1454 from mlocati/fix-search-results-highlight

Fix highlighting of search results