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é