Encode project name in download commands

This allows to use download commands in case project name
contains any special characters i.e. spaces

Bug: Issue 10021
Change-Id: Iac4288559662b0a9beda3d33a06ef2e8c54bc338
Signed-off-by: Eryk Szymanski <eryksz@gmail.com>
(cherry picked from commit 8a88d06df1f5dd5a572d1bae703710efa55d0acd)
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
index 6443095..77a1e2a 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js
@@ -307,9 +307,9 @@
         commands.push({
           title,
           command: commandObj[title]
-              .replace('${project}', repo)
+              .replace('${project}', encodeURI(repo))
               .replace('${project-base-name}',
-              repo.substring(repo.lastIndexOf('/') + 1)),
+              encodeURI(repo.substring(repo.lastIndexOf('/') + 1))),
         });
       }
       return commands;