Permalink
Browse files

Merge pull request #22 from Trott/valid-id-chars-only

alphanumerics and _ in ids only
  • Loading branch information...
2 parents 00082d1 + c4ba4b3 commit f24ce532a4968ab61ba5e1b2c0ef26cdaad78c48 @Trott committed Jul 18, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/main.js
View
2 js/main.js
@@ -1,4 +1,4 @@
-var id = location.search.substring(1) || "1";
+var id = location.search.substring(1).replace(/\W/g, '') || "1";
d3.json('data/' + id + '.json', function (error, links) {
if (error) {
d3.select(".visualization").remove();

0 comments on commit f24ce53

Please sign in to comment.