Re: Re: note 8396 added to get_html_translation_table

From: Date: Mon, 11 Sep 2000 11:26:36 +0000
Subject: Re: Re: note 8396 added to get_html_translation_table
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-32895@lists.php.net to get a copy of this message
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).
jons comment does not help the user in any way, I don´t know what he thought of exactly, but the only thing that *could* be promlematic (if sb. who changes forgets to change both) is that the special character translation "table" is no common array like "EntTable", instead the conversions are typed separately in both functionsm, his comment is definitely wrong for the "all-entities"-case these two functions are involved... - PHP_FUNCTION(get_html_translation_table) and - PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newlen, int all) could be changed, but as these *special-character*-conversion is not likely to change very often its not really needed, thus that note should be removed as users ought to use these three functions all together without expecting get_html_translation_table() to output sth. differing from what htmlspecialchars() does andré

« previous php.dev (#32895) next »