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

Update BlockEditorToolbar.js DOM text reinterpreted as HTML #294

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Shivam7-1
Copy link
Contributor

By using innerText, it will avoid the risk of HTML injection, as these properties automatically escape any HTML special characters in the provided text. This helps prevent cross-site scripting (XSS) vulnerabilities by treating the input as plain text rather than interpreted HTML.

@Shivam7-1
Copy link
Contributor Author

Hi @MarkusBordihn Could You Please Review This PR
Thanks

@MarkusBordihn MarkusBordihn merged commit 0bc8548 into google:main Apr 26, 2024
8 checks passed
@MarkusBordihn
Copy link
Member

Thank you for your thorough explanation regarding the use of innerText to mitigate the risk of HTML injection and potential cross-site scripting (XSS) vulnerabilities.
Given that the text provided is static and does not involve any user input, the risk of XSS vulnerabilities is indeed minimal in this specific use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants