BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+1
-1
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