Skip to content

Commit

Permalink
[fix] Fixed scripting issues due to improperly encoded kibana payload.
Browse files Browse the repository at this point in the history
  • Loading branch information
bevacqua committed Jun 28, 2016
1 parent 1248b2f commit 08a6f40
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/ui/views/chrome.jade
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
- var j = function (o) { return JSON.stringify(o); }
- var appName = 'kibana';
-
var appName = 'kibana';
function encoded (data) {
var scriptend = /\<\s*\/\s*script\s*>/ig;
var concatend = '</" + "script>';
return JSON.stringify(data).replace(scriptend, concatend);
}
block vars

Expand All @@ -12,5 +18,5 @@ html(lang='en')
title Kibana
block head
body(kbn-chrome, id='#{appName}-body')
script window.__KBN__ = !{j(kibanaPayload)};
script window.__KBN__ = !{encoded(kibanaPayload)};
block content

0 comments on commit 08a6f40

Please sign in to comment.