Skip to content

Instantly share code, notes, and snippets.

@mleinart
Created May 24, 2012 05:26
Show Gist options
  • Save mleinart/2779622 to your computer and use it in GitHub Desktop.
Save mleinart/2779622 to your computer and use it in GitHub Desktop.
Fix to percent containing metrics in saved graphs
diff --git a/webapp/content/js/composer.js b/webapp/content/js/composer.js
index 8e73a5c..734a381 100644
--- a/webapp/content/js/composer.js
+++ b/webapp/content/js/composer.js
@@ -205,7 +205,7 @@ ParameterizedURL.prototype = {
setQueryString: function (qs) {
/* Use the given query string (and update this.params to match) */
- this.queryString = qs.replace(/#/,"%23");
+ this.queryString = qs.replace(/%/,"%25").replace(/#/,"%23");
this.syncParams();
this.syncQueryString();
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment