Commit 0bbc61d8 authored by Phil Hughes's avatar Phil Hughes

Fixes the repository Vue router not working with Chinese characters

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/209033
parent ef4a021f
......@@ -27,9 +27,9 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
fetchpromise = axios
.get(
`${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${encodeURIComponent(
path.replace(/^\//, ''),
)}`,
`${gon.relative_url_root}/${projectPath}/-/refs/${encodeURIComponent(
ref,
)}/logs_tree/${encodeURIComponent(path.replace(/^\//, ''))}`,
{
params: { format: 'json', offset },
},
......
......@@ -12,7 +12,7 @@ export default function createRouter(base, baseRef) {
base: joinPaths(gon.relative_url_root || '', base),
routes: [
{
path: `(/-)?/tree/${escape(baseRef)}/:path*`,
path: `(/-)?/tree/(${encodeURIComponent(baseRef)}|${baseRef})/:path*`,
name: 'treePath',
component: TreePage,
props: route => ({
......
---
title: Fixes the repository Vue router not working with Chinese characters
merge_request: 27494
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment