Escape tab symbol when saving report to json
Posted: Thu Dec 13, 2018 10:47 am
JS Designer (2018.3.5) can't open reports if any text field contains tab symbol.
Steps to reproduce:
1. Create new report in designer
2. Add new any SQL data source with query contained tab symbol. You can't add it with tab key so just copy from some text editor.
3. Save report as file
4. Open report file. Designer will crash when trying to JSON.parse(...).
As I can see, Stimulsoft.Base.StiJson.serialize() method make some escaping for special chars, but \t char is replaced with the same \t, while it must be replaced to \\t.
Steps to reproduce:
1. Create new report in designer
2. Add new any SQL data source with query contained tab symbol. You can't add it with tab key so just copy from some text editor.
3. Save report as file
4. Open report file. Designer will crash when trying to JSON.parse(...).
As I can see, Stimulsoft.Base.StiJson.serialize() method make some escaping for special chars, but \t char is replaced with the same \t, while it must be replaced to \\t.