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

parse_hotspot_config.ts DOM text reinterpreted as HTML #4748

Merged
merged 2 commits into from
Apr 15, 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. Always be cautious when dealing with user input or dynamic content to prevent security risks.

Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like TS is complaining because it's not sure if the query you did is returning the right kind of element. Should be a simple casting fix.

@Shivam7-1
Copy link
Contributor Author

Hi @elalish
Thanks For Reviewing
I had done changes to it accordingly now it will work fine
Thanks

@Shivam7-1 Shivam7-1 requested a review from elalish April 15, 2024 16:46
Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elalish elalish merged commit b3987ed into google:master Apr 15, 2024
3 checks passed
JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
* Update parse_hotspot_config.ts

* Updated parse_hotspot_config.ts
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.

None yet

2 participants