Q. Which function prevents XSS attacks?
β
Correct Answer: (B)
htmlspecialchars()
Explanation: htmlspecialchars escapes HTML special characters.