module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

Bad characters in state names

Open dehall opened this issue 6 years ago • 3 comments

Field for state name will accept any character but certain characters can break the editor, for example using a dot . will cause the state to basically become un-editable, and using < or > will throw an error and crash the app. Maybe the text field shouldn't allow these characters, but it's still possible to edit the JSON directly so it shouldn't crash if someone loads a JSON with these characters in a state name

dehall avatar May 09 '18 13:05 dehall

Confirmed that a pre-existing module with a period in the state name causes problems. Is it ok if I strip them on load? Or leave it for now any maybe circle back later now that users can't enter them? Or should I rewrite the whole state renderer to track references via a strings? ;-)

arscan avatar May 10 '18 20:05 arscan

If you strip it on load and use the "rename" logic to update all references to it that's probably a good enough solution for now.

dehall avatar May 11 '18 12:05 dehall

Great point! All references would need to be updated.

arscan avatar May 11 '18 14:05 arscan