mingo-app / mingo

Found a bug? have a FR ?
60 stars 2 forks source link

Double backslashes gets changed to single one while editing #631

Open frebos88 opened 6 months ago

frebos88 commented 6 months ago

Describe the bug

Create a new document:

{
    "test": {
      "iAmAnEscapedString": "Don\\t remove backslashes"
    }
  }

Click edit document, and you will see that one backslash is removed in the edit screen, so if you are not careful you will save the document with one backslash less and something that uses it might stop working.

{
    "_id": new ObjectId("65f30d296036219a20e72274"),
    "test": {
      "iAmAnEscapedString": "Don\t remove backslashes"
    }
  }

The value of "iAmAnEscapedString" have now changed to "Don\t remove backslashes"

Also when expanding the "test" object, visually Mingo will only show one backslash if the string has two of them.

sagrawal31 commented 3 months ago

Please check https://github.com/mingo-app/mingo/issues/628