Commit 9c58f4d3 authored by Albert Gräf's avatar Albert Gräf
Browse files

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
parent baaec1b4
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment