How JSX prevents Injection Attacks?
- By using string concatenation
- By using a virtual DOM
- By escaping special characters
- By using JavaScript eval() function
JSX prevents injection attacks by escaping special characters. When JSX is compiled, special characters are automatically escaped, preventing them from being interpreted as code. This helps to prevent XSS (cross-site scripting) attacks.
Loading...