aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-07-21 15:18:40 +0900
committerGitHub <noreply@github.com>2023-07-21 06:18:40 +0000
commitd57e55cd470ec737c8a9458f0ef96455e0c322ec (patch)
tree6112177e869b220235255f5288be0abf2468a444
parente89adec2a5f2e6cb678746ef89a42167f0042ea5 (diff)
downloadgitea-d57e55cd470ec737c8a9458f0ef96455e0c322ec.tar.gz
gitea-d57e55cd470ec737c8a9458f0ef96455e0c322ec.zip
Fix escape problems in the branch selector (#25875)
Fix #25865
-rw-r--r--web_src/js/components/RepoBranchTagSelector.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/web_src/js/components/RepoBranchTagSelector.vue b/web_src/js/components/RepoBranchTagSelector.vue
index 5d08575278..4fc3936244 100644
--- a/web_src/js/components/RepoBranchTagSelector.vue
+++ b/web_src/js/components/RepoBranchTagSelector.vue
@@ -108,7 +108,7 @@ const sfc = {
return this.items.filter((item) => item.name.toLowerCase() === this.searchTerm.toLowerCase()).length === 0;
},
formActionUrl() {
- return `${this.repoLink}/branches/_new/${pathEscapeSegments(this.branchNameSubURL)}`;
+ return `${this.repoLink}/branches/_new/${this.branchNameSubURL}`;
},
},
@@ -274,15 +274,15 @@ export function initRepoBranchTagSelector(selector) {
if (data.showBranchesInDropdown && data.branches) {
for (const branch of data.branches) {
- data.items.push({name: branch, url: branch, branch: true, tag: false, selected: branch === data.defaultBranch});
+ data.items.push({name: branch, url: pathEscapeSegments(branch), branch: true, tag: false, selected: branch === data.defaultBranch});
}
}
if (!data.noTag && data.tags) {
for (const tag of data.tags) {
if (data.release) {
- data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.release.tagName});
+ data.items.push({name: tag, url: pathEscapeSegments(tag), branch: false, tag: true, selected: tag === data.release.tagName});
} else {
- data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.defaultBranch});
+ data.items.push({name: tag, url: pathEscapeSegments(tag), branch: false, tag: true, selected: tag === data.defaultBranch});
}
}
}