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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Sun Oct 06 00:01:28 2024 UTC