Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 21:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 21:09:05 +0300
commit883d5720994852248f18cb3053dc9f053f28d6f9 (patch)
tree409c976ddc659f34afaae3b2e97f1d0325f6455c /app/assets/javascripts/repository
parent5e97da08cba997aefba6f6d13850f95536a80477 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r--app/assets/javascripts/repository/commits_service.js2
-rw-r--r--app/assets/javascripts/repository/utils/ref_switcher_utils.js7
2 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/repository/commits_service.js b/app/assets/javascripts/repository/commits_service.js
index f009c0310c5..d029f8cf89f 100644
--- a/app/assets/javascripts/repository/commits_service.js
+++ b/app/assets/javascripts/repository/commits_service.js
@@ -35,7 +35,7 @@ const fetchData = (projectPath, path, ref, offset) => {
gon.relative_url_root || '/',
projectPath,
'/-/refs/',
- ref,
+ encodeURIComponent(ref),
'/logs_tree/',
encodeURIComponent(removeLeadingSlash(path)),
);
diff --git a/app/assets/javascripts/repository/utils/ref_switcher_utils.js b/app/assets/javascripts/repository/utils/ref_switcher_utils.js
index 8ff52104c93..ceb80d85f74 100644
--- a/app/assets/javascripts/repository/utils/ref_switcher_utils.js
+++ b/app/assets/javascripts/repository/utils/ref_switcher_utils.js
@@ -24,7 +24,12 @@ export function generateRefDestinationPath(projectRootPath, selectedRef) {
[, namespace, , target] = match;
}
- const destinationPath = joinPaths(projectRootPath, namespace, selectedRef, target);
+ const destinationPath = joinPaths(
+ projectRootPath,
+ namespace,
+ encodeURIComponent(selectedRef),
+ target,
+ );
return `${destinationPath}${window.location.hash}`;
}