diff --git a/pd/nw/dialog_canvas.html b/pd/nw/dialog_canvas.html
index 29d4cbca0521a736d7d106911ffd991b8657f90e..ecc295c9d5d1d8ff68999f45945aef2d4aff8f79 100644
--- a/pd/nw/dialog_canvas.html
+++ b/pd/nw/dialog_canvas.html
@@ -500,16 +500,6 @@ function substitute_space(arg) {
     return arg.split(" ").join(fake_space);
 }
 
-function strip_problem_chars(arg) {
-    var problem_chars = [";", ",", "{", "}", "\\"],
-        ret = arg,
-        i;
-    for (i = 0; i < problem_chars.length; i++) {
-        ret = ret.split(";").join("");
-    }
-    return ret;
-}
-
 function get_input(name) {
     var val = document.getElementsByName(name)[0].value;
     return val;
diff --git a/pd/nw/dialog_gatom.html b/pd/nw/dialog_gatom.html
index b0f8f39904e9c296bf490146f1f134321ac71967..60e87cb26ded45afa8dae68e86120c86eb65ec4e 100644
--- a/pd/nw/dialog_gatom.html
+++ b/pd/nw/dialog_gatom.html
@@ -167,7 +167,7 @@ function strip_problem_chars(arg) {
     var problem_chars = [";", ",", "{", "}", "\\"];
     var ret = arg;
     for(var i = 0; i < problem_chars.length; i++) {
-        ret = ret.split(";").join("");
+        ret = ret.split(problem_chars[i]).join("");
     }
     return ret;
 }
diff --git a/pd/nw/dialog_iemgui.html b/pd/nw/dialog_iemgui.html
index fa782da108f18c30cd91ce05728b2c38d831478c..1a22fbe5035c2e16b93d4938d7ed22b2740bea3c 100644
--- a/pd/nw/dialog_iemgui.html
+++ b/pd/nw/dialog_iemgui.html
@@ -350,7 +350,7 @@ function strip_problem_chars(arg) {
         ret = arg,
         i;
     for(i = 0; i < problem_chars.length; i++) {
-        ret = ret.split(";").join("");
+        ret = ret.split(problem_chars[i]).join("");
     }
     return ret;
 }