To mitigate the risk of XSS attacks, developers should ________ any data that is output to the browser.
- Escape
- Encrypt
- Validate
- Sanitize
Developers should "Escape" any data that is output to the browser to protect against XSS (Cross-Site Scripting) attacks. Escaping ensures that user-generated content is displayed as plain text, preventing script execution.
Loading...
Related Quiz
- What is the purpose of the switch statement in PHP?
- Which of the following are true about arrays in PHP?
- In PHP, $_REQUEST is a superglobal array that contains the contents of $_GET, $_POST, and $_COOKIE. It is commonly used to collect the ______ data after submitting an HTML form.
- PHP is a server-side ______ language.
- The $_POST superglobal in PHP is often used to handle form data.