Which of the following functions are used to escape data within the context of HTML? (Choose two.)
Which of the following functions are used to escape data within the context of HTML? (Choose two.)
The functions used to escape data within the context of HTML are htmlentities() and htmlspecialchars(). The htmlentities() function converts characters to HTML entities, preventing code execution and ensuring the correct display in the browser. The htmlspecialchars() function converts special characters to HTML entities, which helps in preventing XSS (Cross-Site Scripting) attacks by escaping characters like <, >, &, and ".
Answer is A,E
Agreed, htmlspecialchars() is also correct (E).