Commit 38790e2c by Torkel Ödegaard

fix(elasticsearch): fixed templating lucene / json escaping issue, fixes #5228, fixes #5227

parent 724a5119
......@@ -205,7 +205,9 @@ function (angular, _, moment, kbn, ElasticQueryBuilder, IndexPattern, ElasticRes
};
function escapeForJson(value) {
return value.replace(/\"/g, '\\"');
return value
.replace(/\s/g, '\\ ')
.replace(/\"/g, '\\"');
}
function luceneThenJsonFormat(value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment