Women in Technology

Hear us Roar



Article:
  PHP Form Handling
Subject:   ad htmlentities
Date:   2004-09-30 15:47:58
From:   llook.wz.cz
Do not use htmlentities() for encoding any data! Please, use the htmlspecialchars(). Htmlentities encodes everything what is possible to encode, but htmlspecialchars encodes only the characters which are necessary to encode.
Htmlentities is acceptable only if you exactly know the input and output encoding.
That's problem of some languages using special chars (e.g. Czech).