Fix Bug 885548 - Prevent malicious code being passed in as search types ...

...and queries hitting client side

https://bugzilla.mozilla.org/show_bug.cgi?id=885548