Which of the following is a common technique used to prevent cross-site scripting (XSS) attacks?
- Input validation
- Using strong passwords
- Escaping user-generated content
- Storing user data in plain text format
To prevent cross-site scripting (XSS) attacks, it's common to escape user-generated content before rendering it in web pages. This prevents code execution.
Loading...
Related Quiz
- What is the actually used PHP version?
- You are writing a PHP script and you need to upload a file. How would you do this?
- A variable that starts with a number in PHP will result in a ________.
- What is the purpose of the array_unique() function in PHP?
- You are writing a PHP script and you want to execute a block of code as long as a certain condition is true. How would you do this using a while loop?