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) { ...@@ -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