Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Incomplete string escaping or encoding (elastic#212847)
Fix for [https://github.com/elastic/kibana/security/code-scanning/546](https://github.com/elastic/kibana/security/code-scanning/546) To fix the problem, we need to ensure that backslashes are also escaped in the `trim_key` and `trim_value` properties of the `kvInput` object. This can be done by adding an additional replace call to escape backslashes before escaping single and double quotes. The best way to fix this without changing existing functionality is to use a regular expression with the `g` flag to replace all occurrences of backslashes with double backslashes. Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> (cherry picked from commit 8970b99)
- Loading branch information