Re: note 8396 added to get_html_translation_table

From: Date: Sun, 10 Sep 2000 23:52:48 +0000
Subject: Re: note 8396 added to get_html_translation_table
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-32849@lists.php.net to get a copy of this message
jon+php-dev@unequivocal.co.uk writes: > Caution: This function is implemented separately from htmlentities() > and htmlspecialchars() in the PHP source, and hence is quite likely > to diverge from these functions. > > In particular, in 4.0.2 htmlspecialchars() escapes the single quote > character, whereas the translation table returned by this function > does not. > > > http://www.php.net/manual/function.get-html-translation-table.php Can someone verify this? A quick scan of the ext/standard/html.c seems to indicate that get_html_translation_table() does, indeed, use the actual translation table as used by htmlentities(). Granted, it doesn't use the same 'table' as htmlspecialchars(), but unless those four entities change, it would strike me that divergence, while possible, is wildly unlikely (and quickly fixed). -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben@netmill.fi| +----------------------------------------------------------------+

« previous php.dev (#32849) next »