200-710 Exam QuestionsBrowse all questions from this exam

200-710 Exam - Question 11


Which of the following functions are used to escape data within the context of HTML? (Choose two.)

Show Answer
Correct Answer: AE

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 ".

Discussion

2 comments
Sign in to comment
JeffryOptions: AE
Oct 18, 2019

Answer is A,E

stefanospetrakisOption: E
Nov 11, 2020

Agreed, htmlspecialchars() is also correct (E).