Re: Re: note 8396 added to get_html_translation_table

From: Date: Mon, 11 Sep 2000 13:22:03 +0000
Subject: Re: Re: note 8396 added to get_html_translation_table
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-32906@lists.php.net to get a copy of this message
André Langhorst <A.Langhorst@itbnet.de> wrote: > jons comment does not help the user in any way Yes it does. I am not quite sure why anyone would want this function at all, but it seems reasonable that if they do want it, they might expect it to behave as documented. It not only potentially doesn't, but actually doesn't (in 4.0.2). > but the only thing that *could* be promlematic (if sb. who changes forgets > to change both) This is not a hypothetical problem, it has actually happened. > his comment is definitely wrong for the "all-entities"-case No, it isn't. Look at the code. For both htmlspecialchars, and htmlentities, the same function is used. This function uses the translation table only for characters 160 and above, and has some other hard-coded translations which are used regardless of what the table says. > 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 That is exactly the reason that the comment should stay. You can't just pretend that reality is different than it is. Cheers Jon

« previous php.dev (#32906) next »