Browse files

fixing icon name str replace

  • Loading branch information...
1 parent 89e0787 commit 3f546682181297ec84a54e63340de9758927341c @draeton committed Dec 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/icon.js
View
2 src/icon.js
@@ -26,7 +26,7 @@
var self = this;
this.guid = guid++;
- this.name = name.replace(/\.|\s+/gi, "-");
+ this.name = name.replace(/[\s.]+/gi, "-").replace(/[^a-z0-9\-]/gi, "_");
this.image = new Image();
this.image.onload = function () {

0 comments on commit 3f54668

Please sign in to comment.