Commit 725a8774 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix bad port of tcl [string map] command to series of javascript String.replace

replacing literal "+" must come first
parent add5c668
......@@ -75,11 +75,11 @@ function string_to_array_of_chunks(msg) {
// Should probably be in pdgui.js
function encode_for_dialog(s) {
s = s.replace(/\+/g, "++");
s = s.replace(/\s/g, "+_");
s = s.replace(/\$/g, "+d");
s = s.replace(/;/g, "+s");
s = s.replace(/,/g, "+c");
s = s.replace(/\+/g, "++");
s = "+" + s;
return s;
}
......
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