From 9c58f4d38e598c6ad9049bdaff7cd801580f492a Mon Sep 17 00:00:00 2001 From: Albert Graef <aggraef@gmail.com> Date: Thu, 17 Nov 2016 08:21:05 +0100 Subject: [PATCH] Fixes to strip_problem_chars function - ret.split(";") should be ret.split(problem_chars[i]) - remove the function from dialog_canvas.html where it isn't needed --- pd/nw/dialog_canvas.html | 10 ---------- pd/nw/dialog_gatom.html | 2 +- pd/nw/dialog_iemgui.html | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/pd/nw/dialog_canvas.html b/pd/nw/dialog_canvas.html index 29d4cbca0..ecc295c9d 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 b0f8f3990..60e87cb26 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 fa782da10..1a22fbe50 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; } -- GitLab