PHP 4.0 Bug #8018 Updated: get_html_translation_table() produces wrong conversion

From: Date: Tue, 28 Nov 2000 23:26:12 +0000
Subject: PHP 4.0 Bug #8018 Updated: get_html_translation_table() produces wrong conversion
Groups: php.dev 
Request: Send a blank email to php-dev+get-39428@lists.php.net to get a copy of this message
ID: 8018 Updated by: waldschrott Reported By: urs@circle.ch Status: Open Bug Type: Strings related Assigned To: Comments: this has already been fixed a week (two?) ago, I wonder which Latest CVS you do use? :) I cannot confirm, it works with my build Previous Comments: --------------------------------------------------------------------------- [2000-11-28 17:27:44] urs@circle.ch dear all while using get_html_translation_table() i recognized a wrong conversion of the "&" character to "'" instead of "&amp;". could this confirm someone? <?php $str = "Hallo & <Pallo> & küßchen & ö & ä & à"; $trans = get_html_translation_table(HTML_SPECIALCHARS); echo strtr($str, $trans) . "<br>n"; // output: Hallo ' <Pallo> ' küßchen ' ö ' ä ' à echo htmlspecialchars($str) . "<br>n"; // output: Hallo & <Pallo> & küßchen & ö & ä & à echo htmlentities($str) . "<br>n"; // output: Hallo & <Pallo> & küßchen & ö & ä & à ?> -- Urs Gehrig <urs@circle.ch> http://www.circle.ch --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8018

« previous php.dev (#39428) next »