What is DangerouslySetInnerHTML in React JS ? Prevent Common XSS (Cross Side Scripting) Attacks

preview_player
Показать описание
In this video, we are going to learn what is dangerouslySetInnerHTML in React JS. How to prevent many common XSS (Cross Side Scripting) Attacks. There are many different forms of cross site scripting, but the most common cause of cross site scripting is setting HTML from code . We'll understand everything in depth with various examples.

Timestamps:
00:00 Introduction
01:14 Syntax
01:38 Why is it called dangerouslySetInnerHTML?
02:56 Common XSS Attacks
04:42 Solution - sanitize HTML

Рекомендации по теме
Комментарии
Автор

This is actually very easy and helpful, thank you a lot

neodinok-itym
Автор

Hi.. but with this we cannot use onerror.. so it's better we can also remove onerror from redux or api from where we are getting the data html.. please advise

siddharthpathak