escape slashes in query syntax. fixes #345