Use encodeURIComponent instead of escpae