Added encodeURIComponent encoding