Search fixes and validation

Now search works for multiple searches and the text is encoded.