Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix code scanning alert no. 4: Incomplete string escaping or encoding #8

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

guruh46
Copy link
Owner

@guruh46 guruh46 commented Nov 27, 2024

Fixes https://github.com/guruh46/vscode-gitlens/security/code-scanning/4

To fix the problem, we need to ensure that backslashes are also escaped in the issueTitle. This can be done by using a regular expression that handles both double quotes and backslashes. We will replace the current issueTitle.replace(/"/g, '\\"') with a more comprehensive regular expression that escapes both characters.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@guruh46 guruh46 marked this pull request as ready for review November 27, 2024 11:27
@guruh46 guruh46 merged commit 23580e5 into main Nov 27, 2024
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant