Pergunta de entrevista da empresa Close

In vanilla javascript how do you handle cross site scripting?

Resposta da entrevista

Sigiloso

10 de set. de 2024

To be honest I don't remember because I haven't injected user input into the browser, maybe ever, in vanilla javascript and would utilized React and Vue to handle that. If I had to allow user input I would use React's dangerouslySetInnerHTML and some 3rd party package to sanitize the input.

1