-
Notifications
You must be signed in to change notification settings - Fork 12
Description
If you create an area in Data Management -> Areas with a name that contains the '
character, like "I don't know", it will later break the user edition page (Data Management -> Users. It will be empty and show this error in the browser console:
Uncaught SyntaxError: missing ] after element list
The reason is that, at some point, we generate a piece of JS code with a list of areas like this:
data : [
[2, 'Web'],[3, 'Systems'],[4, 'Management'],[5, 'I don't know'],]
Where we use '
to enclose strings, and we don't do any escaping of the string so we are generating incorrect JavaScript.