ReactSecurity - Sanitize Content When Setting InnerHTML

Published: 21 April 2020
on channel: Holodeck
13,864
354

See the full course at https://reactsecurity.io

There are some situations where we need to set the InnerHTML of an element in our app. For example, we may need to render pre-formatted HTML content, possibly supplied by a user.

Setting an element's InnerHTML is a very common cross-site scripting attack vector. A user may supply some content that triggers a script to execute in our app, putting our users at risk.

Let's see how to sanitize content when setting the InnerHTML of an element in a React application.


On this page of the site you can watch the video online ReactSecurity - Sanitize Content When Setting InnerHTML with a duration of hours minute second in good quality, which was uploaded by the user Holodeck 21 April 2020, share the link with friends and acquaintances, this video has already been watched 13,864 times on youtube and it was liked by 354 viewers. Enjoy your viewing!