django / djangoproject.com

Source code to djangoproject.com
https://www.djangoproject.com/
BSD 3-Clause "New" or "Revised" License
1.86k stars 939 forks source link

Update excanvas.js DOM text reinterpreted as HTML #1533

Closed Shivam7-1 closed 1 month ago

Shivam7-1 commented 1 month ago

By using textContent, 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.