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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
477be056
Commit
477be056
authored
May 12, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue boards not filtering when URL params are encoded
Closes #32084
parent
2ac27a96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+1
-1
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+10
-0
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
477be056
...
...
@@ -135,7 +135,7 @@
gl
.
utils
.
getUrlParamsArray
=
function
()
{
// We can trust that each param has one & since values containing & will be encoded
// Remove the first character of search as it is always ?
return
window
.
location
.
search
.
slice
(
1
).
split
(
'
&
'
);
return
window
.
location
.
search
.
slice
(
1
).
split
(
'
&
'
)
.
map
(
param
=>
decodeURI
(
param
))
;
};
gl
.
utils
.
isMetaKey
=
function
(
e
)
{
...
...
spec/javascripts/lib/utils/common_utils_spec.js
View file @
477be056
...
...
@@ -41,6 +41,16 @@ require('~/lib/utils/common_utils');
const
paramsArray
=
gl
.
utils
.
getUrlParamsArray
();
expect
(
paramsArray
[
0
][
0
]
!==
'
?
'
).
toBe
(
true
);
});
it
(
'
should decode params
'
,
()
=>
{
history
.
pushState
(
''
,
''
,
'
?label_name%5B%5D=test
'
);
expect
(
gl
.
utils
.
getUrlParamsArray
()[
0
],
).
toBe
(
'
label_name[]=test
'
);
history
.
pushState
(
''
,
''
,
'
?
'
);
});
});
describe
(
'
gl.utils.handleLocationHash
'
,
()
=>
{
...
...
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