mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
- urlescape our strings so they're safer (and easier to paste places)
This commit is contained in:
parent
c986701c2c
commit
0befaa3037
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
var search = function(query) {
|
||||
params.q = query;
|
||||
document.location.hash = JSON.stringify(params);
|
||||
document.location.hash = escape(JSON.stringify(params));
|
||||
$("#results").load("/search/ajax", params);
|
||||
$("#query").val(params.q);
|
||||
};
|
||||
|
@ -14,7 +14,7 @@
|
|||
$().ready(function() {
|
||||
if (location.hash.length > 1) {
|
||||
try {
|
||||
params = JSON.parse(location.hash.substring(1));
|
||||
params = JSON.parse(unescape(location.hash.substring(1)));
|
||||
} catch (e) {
|
||||
// Do nothing
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
|||
}
|
||||
|
||||
$(window).hashchange(function() {
|
||||
params = JSON.parse(location.hash.substring(1));
|
||||
params = JSON.parse(unescape(location.hash.substring(1)));
|
||||
query = params.q
|
||||
if (query != $("#query").val()) {
|
||||
scroll(0, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue