Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
dc98cb9e
Commit
dc98cb9e
authored
Jan 22, 2020
by
Ryan Herbert
Committed by
marc duez
Jun 03, 2020
Browse files
url.js param failsafe
if a parameter is passed that doesn't respect the format, ignore it
parent
37c44301
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/js/url.js
View file @
dc98cb9e
...
...
@@ -115,6 +115,13 @@ Url.prototype= {
}
for
(
var
i
=
0
;
i
<
url_param
.
length
;
i
++
)
{
var
tmparr
=
url_param
[
i
].
split
(
"
=
"
);
// if the format isn't respected ignore parameter
if
(
tmparr
.
length
!==
2
)
{
console
.
log
(
"
incorrect parameter:
"
+
url_param
[
i
]);
continue
;
}
var
p
=
params
[
tmparr
[
0
]];
var
key
=
this
.
encoder
.
decode
(
tmparr
[
0
]);
var
val
=
tmparr
[
1
];
...
...
Write
Preview
Supports
Markdown
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