Encode query uri component properly
Previously we used encodeURI() to encode a single component of a URI, this meant that characters like = were not encoded. This isn't correct bceause we are just encoding a single component and need = to be encoded. Fix this by using encodeURIComponent which should do the right thing. Change-Id: Ib320c1e646ccbd2233bd9d7a2be9df29ff7bd1ed
This commit is contained in:
parent
47f7ddf78f
commit
df57bd6f9e
@ -58,7 +58,7 @@ function (angular, _) {
|
||||
id : "urllink",
|
||||
// Note that we hvae to do the encode json thing because kibana
|
||||
// wants the parameters to be json quoted then url quoted ... :(
|
||||
link : window.location.href.replace(window.location.hash,"")+"#dashboard/file/logstash.json?query="+encodeURI(JSON.stringify(dashboard.current.services.query.list[0].query).slice(1,-1)),
|
||||
link : window.location.href.replace(window.location.hash,"")+"#dashboard/file/logstash.json?query="+encodeURIComponent(JSON.stringify(dashboard.current.services.query.list[0].query).slice(1,-1)),
|
||||
title : "Share URL"
|
||||
};
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user