Commit f8f2353d authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'ph/209033/chineseCharsInVueRouter' into 'master'

Fixes the repository Vue router not working with Chinese characters

Closes #209033

See merge request gitlab-org/gitlab!27494
parents 2ab6f722 0bbc61d8
......@@ -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