Encode URLs correctly in search
Fixes things like hashes in URLs