module-builder
module-builder copied to clipboard
Bad characters in state names
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
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? ;-)
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.
Great point! All references would need to be updated.