Posted By

Zwendel on 12/28/09


form php quote input field characters

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Handling quote characters in HTML form input fields

 / Published in: PHP

  1. htmlentities($this->value, ENT_QUOTES)
  3. // The ENT_QUOTES parameter in the htmlentities() function ensures that single quote characters are encoded, since by default they are not (though double quote characters are). htmlentities() also encodes other characters and is useful for ensuring that characters such as "<" and "&" are not interpreted as HTML special characters.
  4. // source:

Report this snippet  

You need to login to post a comment.