Skip to content

Potential fix for code scanning alert no. 6: DOM text reinterpreted as HTML#20

Open
exequielloza wants to merge 1 commit intomainfrom
alert-autofix-6
Open

Potential fix for code scanning alert no. 6: DOM text reinterpreted as HTML#20
exequielloza wants to merge 1 commit intomainfrom
alert-autofix-6

Conversation

@exequielloza
Copy link
Copy Markdown

Potential fix for https://github.com/splightplatform/splight-mapbox/security/code-scanning/6

To fix the problem, we should avoid using innerHTML to set the text content of the label. Instead, we can use textContent, which sets the text content of the node and does not interpret it as HTML. This will prevent any potential XSS vulnerabilities.

  • Replace the usage of innerHTML with textContent for setting the text content of the labels.
  • Specifically, change the lines where innerHTML is used to update the labels with the values from the sliders.

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

…s HTML

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@exequielloza exequielloza marked this pull request as ready for review January 15, 2026 18:48
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