Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
60307f16
Commit
60307f16
authored
Mar 18, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix directory paths incorrectly encoding URLs
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/209075
parent
3d13b601
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+2
-2
app/assets/javascripts/repository/components/table/row.vue
app/assets/javascripts/repository/components/table/row.vue
+2
-2
spec/frontend/repository/components/table/row_spec.js
spec/frontend/repository/components/table/row_spec.js
+4
-1
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
60307f16
<
script
>
import
{
GlDropdown
,
GlDropdownDivider
,
GlDropdownHeader
,
GlDropdownItem
}
from
'
@gitlab/ui
'
;
import
{
joinPaths
}
from
'
~/lib/utils/url_utility
'
;
import
{
joinPaths
,
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
__
}
from
'
../../locale
'
;
import
Icon
from
'
../../vue_shared/components/icon.vue
'
;
import
getRefMixin
from
'
../mixins/get_ref
'
;
...
...
@@ -103,7 +103,7 @@ export default {
.
filter
(
p
=>
p
!==
''
)
.
reduce
(
(
acc
,
name
,
i
)
=>
{
const
path
=
joinPaths
(
i
>
0
?
acc
[
i
].
path
:
''
,
e
ncodeURIComponent
(
name
));
const
path
=
joinPaths
(
i
>
0
?
acc
[
i
].
path
:
''
,
e
scapeFileUrl
(
name
));
return
acc
.
concat
({
name
,
...
...
app/assets/javascripts/repository/components/table/row.vue
View file @
60307f16
<
script
>
import
{
escapeRegExp
}
from
'
lodash
'
;
import
{
GlBadge
,
GlLink
,
GlSkeletonLoading
,
GlTooltipDirective
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
visitUrl
,
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
import
TimeagoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
getIconName
}
from
'
../../utils/icon
'
;
...
...
@@ -92,7 +92,7 @@ export default {
computed
:
{
routerLinkTo
()
{
return
this
.
isFolder
?
{
path
:
`/-/tree/
${
escape
(
this
.
ref
)}
/
${
e
ncodeURIComponent
(
this
.
path
)}
`
}
?
{
path
:
`/-/tree/
${
escape
(
this
.
ref
)}
/
${
e
scapeFileUrl
(
this
.
path
)}
`
}
:
null
;
},
iconName
()
{
...
...
spec/frontend/repository/components/table/row_spec.js
View file @
60307f16
...
...
@@ -4,7 +4,10 @@ import { visitUrl } from '~/lib/utils/url_utility';
import
TableRow
from
'
~/repository/components/table/row.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
jest
.
mock
(
'
~/lib/utils/url_utility
'
);
jest
.
mock
(
'
~/lib/utils/url_utility
'
,
()
=>
({
...
jest
.
requireActual
(
'
~/lib/utils/url_utility
'
),
visitUrl
:
jest
.
fn
(),
}));
let
vm
;
let
$router
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment