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) { ...@@ -27,9 +27,9 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
fetchpromise = axios fetchpromise = axios
.get( .get(
`${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${encodeURIComponent( `${gon.relative_url_root}/${projectPath}/-/refs/${encodeURIComponent(
path.replace(/^\//, ''), ref,
)}`, )}/logs_tree/${encodeURIComponent(path.replace(/^\//, ''))}`,
{ {
params: { format: 'json', offset }, params: { format: 'json', offset },
}, },
......
...@@ -12,7 +12,7 @@ export default function createRouter(base, baseRef) { ...@@ -12,7 +12,7 @@ export default function createRouter(base, baseRef) {
base: joinPaths(gon.relative_url_root || '', base), base: joinPaths(gon.relative_url_root || '', base),
routes: [ routes: [
{ {
path: `(/-)?/tree/${escape(baseRef)}/:path*`, path: `(/-)?/tree/(${encodeURIComponent(baseRef)}|${baseRef})/:path*`,
name: 'treePath', name: 'treePath',
component: TreePage, component: TreePage,
props: route => ({ 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