Open Matt15BRJ opened 2 years ago
That kind of thing is to stop people breaking the system as it stops the system treating the text as a potential escape code.
But it has led to the system breaking for 'not enough memory' reasons as the forms have ballooned to over 35MB from the backslashes doubling every time a form gets saved or reloaded.
Ok, I believe the fix...change the expression to
value=value.replace(/(\\|\)/gm,"\\");
this should leave escaped \ already untouched, and escape singular ones, though it gets a little complicated if there are more than 1 \ in a row.
Note when this posted it treated the \ as escaped, so I had to double all \ when adding. Not sure how that will affect any copying.
I was having a problem with my data bloating to huge sizes because everywhere there was a backslash in the json (i.e. all the people pickers and anywhere people used one in a textbox/area) they would double every time the form saved or reloaded. I found the culprit in line 671 of stratus-forms-155.js: value = value.replace(/\/g, "\\"); why is that there? I can't figure out what it is for. commenting it out fixed the problem I was having.