When exporting strings that contains backslashes, the first one is doubled in the exported value:
var { AceBase } = require("acebase")
const db = new AceBase('test');
await db.ref('export').set({ text: 'Strings with multiple \\ backslashes \\ are not \\ exported ok' });
let json = '';
await db.ref('export').export({ write: str => json += str });
After execution, the value of json is {"text":"Strings with multiple \\ backslashes \ are not \ exported ok"}.
The expected value is {"text":"Strings with multiple \ backslashes \ are not \ exported ok"}.
The issue is caused by the escape function in the exportNode method in storage.js, which does a regexp replace on the first occurrence of a backslash
Will be fixed soon
When exporting strings that contains backslashes, the first one is doubled in the exported value:
After execution, the value of
jsonis{"text":"Strings with multiple \\ backslashes \ are not \ exported ok"}.The expected value is
{"text":"Strings with multiple \ backslashes \ are not \ exported ok"}.The issue is caused by the
escapefunction in theexportNodemethod in storage.js, which does a regexp replace on the first occurrence of a backslashWill be fixed soon