mirror of
1
Fork 0

Fix escape problems in the branch selector (#25875)

Fix #25865
This commit is contained in:
yp05327 2023-07-21 15:18:40 +09:00 committed by GitHub
parent e89adec2a5
commit d57e55cd47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ const sfc = {
return this.items.filter((item) => item.name.toLowerCase() === this.searchTerm.toLowerCase()).length === 0; return this.items.filter((item) => item.name.toLowerCase() === this.searchTerm.toLowerCase()).length === 0;
}, },
formActionUrl() { 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) { if (data.showBranchesInDropdown && data.branches) {
for (const branch of 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) { if (!data.noTag && data.tags) {
for (const tag of data.tags) { for (const tag of data.tags) {
if (data.release) { 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 { } 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});
} }
} }
} }