[#67,#87,link,embed][s]: encode query string uri components so they work correctly from link and embedding.

This commit is contained in:
Rufus Pollock
2012-05-15 05:31:15 +01:00
parent 57548e0d17
commit d42d1c0dbd
3 changed files with 3 additions and 3 deletions

View File

@@ -153,7 +153,7 @@
<select name="backend_type"> <select name="backend_type">
<option value="csv">CSV</option> <option value="csv">CSV</option>
<option vlaue="excel">Excel</option> <option vlaue="excel">Excel</option>
<option value="gdocs">Google Spreadsheet</option> <option value="gdoc">Google Spreadsheet</option>
<option value="elasticsearch">ElasticSearch</option> <option value="elasticsearch">ElasticSearch</option>
</select> </select>
</div> </div>

View File

@@ -21,7 +21,7 @@ var ExplorerApp = Backbone.View.extend({
this.router.route(/explorer/, 'explorer', this.viewExplorer); this.router.route(/explorer/, 'explorer', this.viewExplorer);
Backbone.history.start(); Backbone.history.start();
var state = recline.Util.parseQueryString(window.location.search); var state = recline.Util.parseQueryString(decodeURIComponent(window.location.search));
if (state) { if (state) {
_.each(state, function(value, key) { _.each(state, function(value, key) {
try { try {

View File

@@ -56,7 +56,7 @@ my.composeQueryString = function(queryParams) {
if (typeof(value) === 'object') { if (typeof(value) === 'object') {
value = JSON.stringify(value); value = JSON.stringify(value);
} }
items.push(key + '=' + value); items.push(key + '=' + encodeURIComponent(value));
}); });
queryString += items.join('&'); queryString += items.join('&');
return queryString; return queryString;