fixed download url issue by using encodeURIComponent