Return to Snippet

Revision: 21985
at December 28, 2009 04:12 by Zwendel

Initial Code
htmlentities($this->value, ENT_QUOTES)

// 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.
// source:

Initial URL

Initial Description

Initial Title
Handling quote characters in HTML form input fields

Initial Tags
form, php

Initial Language