note 537 deleted from function.htmlentities by jimw

From: Date: Mon, 17 Dec 2001 22:25:08 +0000
Subject: note 537 deleted from function.htmlentities by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23007@lists.php.net to get a copy of this message
Note, that this function currently only escapes ISO-8859-1 (or ISO-latin-1) charset. <P> Currently, if you don't know what you are really doing, you should try to avoid to use this function. You *cannot* rely on that the input an user sends you from his browser is ISO-latin-1. <P> E.g. a user inputs in his charset a hebrew letter, which has in his charset the same ascii-value as Ä in ISO-latin-1, then this function will convert it to Ä. [Reminds us to the old DOS-Days where a DOS-Ä looks like a §$'#& under Unix. :-] There is no easy way to convert this entity back to the correct entity, even if you know the charset, the user has used, cause you don't know if the user hasn't really meant an Ä and not his hebrew counterpart. <P> So it is *not quite correct* to use this function as a superior replacement for things, where HTMLSpecialChars(); is enough, cause you assume, that every instance uses ISO-latin-1.

« previous php.notes (#23007) next »