php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #33534 htmlentities won't encode whitespaces
Submitted: 2005-07-01 14:15 UTC Modified: 2005-07-08 11:02 UTC
From: rt424 at hszk dot bme dot hu Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.3.10 OS: ubuntu linux
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: rt424 at hszk dot bme dot hu
New email:
PHP Version: OS:

 

 [2005-07-01 14:15 UTC] rt424 at hszk dot bme dot hu
Description:
------------
Whenever I use the function htmlentities, it doesn't replace
whitespace characters to ' ', although this replacement is present in the functions translation table.

Reproduce code:
---------------
      $str = "  ";
      $str = htmlentities($str);
      print "'$str'";


Expected result:
----------------
'  '

Actual result:
--------------
' '

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-01 15:08 UTC] tony2001@php.net
This is expected behaviour and it should be mentioned somewhere in the docs.
Reclassified as docu problem.
 [2005-07-08 11:02 UTC] vrana@php.net
' ' in the translation table is not ASCII 32 but ASCII 160. It is stated by html_entity_decode().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 22:01:26 2024 UTC