Skip to content

Unescaped area name can break users page #564

@jaragunde

Description

@jaragunde

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions