From 0631afa382f89bdc44ffbf3f858a45f27019ba22 Mon Sep 17 00:00:00 2001 From: jartek Date: Wed, 29 Oct 2014 23:18:11 +0530 Subject: [PATCH] Generate escape sequences for characters in the query --- static/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 3736924..e00e02f 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -239,9 +239,10 @@ function exportToCSV() { // Replace line breaks with spaces query = query.replace(/\n/g, " "); - setCurrentTab("table_query"); + query = window.encodeURI(query) + var url = "http://" + window.location.host + "/query?format=csv&query=" + query; var win = window.open(url, '_blank');