Skip to content

getResource changes value of strings with quotes #11

@generalChaos

Description

@generalChaos

FormState.js contains the function:

  this.getResource = function () {
    return JSON.parse(JSON.stringify(_this.obj).replace(/"\s+|\s+"/g, '"'));
  };

The regex replace can change the value of a form element. For example, if you have a textarea with the value foo "bar" foo the regex will change it (remove last space) to foo "bar"foo which is not the desired string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions