diff --git a/pkg/middleware/util.go b/pkg/middleware/util.go index babda94d5e7..c392f215450 100644 --- a/pkg/middleware/util.go +++ b/pkg/middleware/util.go @@ -17,6 +17,10 @@ func Gziper() macaron.Handler { return } + if strings.HasPrefix(requestPath, "/api/plugin-proxy/") { + return + } + ctx.Invoke(macaronGziper) } } diff --git a/public/app/plugins/datasource/elasticsearch/datasource.js b/public/app/plugins/datasource/elasticsearch/datasource.js index d5926be3f81..f6095271b8e 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.js +++ b/public/app/plugins/datasource/elasticsearch/datasource.js @@ -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) {