Skip to content

parse_hotspot_config.ts DOM text reinterpreted as HTML #4748

Merged
elalish merged 2 commits intogoogle:masterfrom
Shivam7-1:patch-2
Apr 15, 2024
Merged

parse_hotspot_config.ts DOM text reinterpreted as HTML #4748
elalish merged 2 commits intogoogle:masterfrom
Shivam7-1:patch-2

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
Contributor

@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
Contributor

@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
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.

2 participants