When handling url use encodeURIComponent to escape.