Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix code scanning alert no. 2: Incomplete string escaping or encoding #22

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

puria
Copy link
Member

@puria puria commented Dec 13, 2024

Fixes https://github.com/ForkbombEu/pqspread/security/code-scanning/2

To fix the problem, we need to ensure that both single quotes and backslashes are properly escaped in the content string. This can be achieved by using a regular expression to replace both characters globally. Specifically, we should first escape backslashes and then escape single quotes.

The changes will be made in the render method of the BrutalistCard class in the file src/webcomponents.js.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant