php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8018 get_html_translation_table() produces wrong conversion
Submitted: 2000-11-28 17:27 UTC Modified: 2000-11-28 18:26 UTC
From: urs at circle dot ch Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0 Latest CVS (28/11/2000) OS: Win2k
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: urs at circle dot ch
New email:
PHP Version: OS:

 

 [2000-11-28 17:27 UTC] urs at circle dot ch
dear all

while using get_html_translation_table() i recognized a wrong conversion of the "&" character to "'" instead of "&".

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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-28 18:26 UTC] waldschrott@php.net
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
 [2000-11-28 18:26 UTC] waldschrott@php.net
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 05:01:27 2024 UTC