Strip out invalid characters from search + add tests for this

Fix for issue #217
https://github.com/professor/whiteboard/issues/217