Skip to content

Commit d57e55c

Browse files
authored
Fix escape problems in the branch selector (#25875)
Fix #25865
1 parent e89adec commit d57e55c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const sfc = {
108108
return this.items.filter((item) => item.name.toLowerCase() === this.searchTerm.toLowerCase()).length === 0;
109109
},
110110
formActionUrl() {
111-
return `${this.repoLink}/branches/_new/${pathEscapeSegments(this.branchNameSubURL)}`;
111+
return `${this.repoLink}/branches/_new/${this.branchNameSubURL}`;
112112
},
113113
},
114114
@@ -274,15 +274,15 @@ export function initRepoBranchTagSelector(selector) {
274274
275275
if (data.showBranchesInDropdown && data.branches) {
276276
for (const branch of data.branches) {
277-
data.items.push({name: branch, url: branch, branch: true, tag: false, selected: branch === data.defaultBranch});
277+
data.items.push({name: branch, url: pathEscapeSegments(branch), branch: true, tag: false, selected: branch === data.defaultBranch});
278278
}
279279
}
280280
if (!data.noTag && data.tags) {
281281
for (const tag of data.tags) {
282282
if (data.release) {
283-
data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.release.tagName});
283+
data.items.push({name: tag, url: pathEscapeSegments(tag), branch: false, tag: true, selected: tag === data.release.tagName});
284284
} else {
285-
data.items.push({name: tag, url: tag, branch: false, tag: true, selected: tag === data.defaultBranch});
285+
data.items.push({name: tag, url: pathEscapeSegments(tag), branch: false, tag: true, selected: tag === data.defaultBranch});
286286
}
287287
}
288288
}

0 commit comments

Comments
 (0)