use encodeURIComponent instead