Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix code scanning alert no. 2: Incomplete string escaping or encoding (…
…#7) Fixes [https://github.com/worldbank/DHIS2-Downloader/security/code-scanning/2](https://github.com/worldbank/DHIS2-Downloader/security/code-scanning/2) To fix the problem, we need to ensure that both double quotes and backslashes are properly escaped in the CSV output. This can be achieved by first escaping backslashes and then escaping double quotes. The order of escaping is important to avoid double-escaping backslashes. The best way to fix this is to update the `objectToCsv` function to use a regular expression that handles both backslashes and double quotes. We will replace the current `replace` call with a more comprehensive one that escapes both characters. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._
- Loading branch information