kieferhax / pokedex-web-application

0 stars 0 forks source link

Fix code scanning alert no. 4: Client-side cross-site scripting #11

Closed kieferhax closed 2 weeks ago

kieferhax commented 2 weeks ago

Fixes https://github.com/kieferhax/pokedex-web-application/security/code-scanning/4

To fix the problem, we need to ensure that any user-provided data is properly sanitized or encoded before being inserted into the HTML. In this case, we can use the he library, which is already imported, to encode the currentLanguage parameter before using it in the HTML.

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