Fixed XSS in search function

There is a small XSS problem in the search function. 

The ```$header``` content isn't being escaped correctly.

This PR should fix it.

Regards