Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Explain the importance of the function htmlentities.

user-image
Question added by Rehan Farooq , WEB DEVELOPER/DIGITAL MARKETING EXPERT , Upwork
Date Posted: 2016/01/30
islam khalil
by islam khalil , Technical Manager , iCloudit

Convert all applicable characters to HTML entities.

EX :

 

  • '"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
  • "'" (single quote) becomes '&#;' (or ') only when ENT_QUOTES is set.
  • '<' (less than) becomes '&lt;'
  • '>' (greater than) becomes '&gt;'

This could be used to prevent XSS attak for example .

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.