A

Admin • 833K Points
Coach

Q. What is the purpose of the PHP function htmlspecialchars()?

  • (A) Convert special characters to HTML entities
  • (B) Strip HTML tags
  • (C) Escape SQL queries
  • (D) Convert text to lowercase
  • Correct Answer - Option(A)
  • Views: 17
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

It is used to prevent XSS by converting characters like <, > to their HTML entities.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.