#33534 [Opn->Bgs]: htmlentities won't encode whitespaces

From: Date: Fri, 08 Jul 2005 09:02:37 +0000
Subject: #33534 [Opn->Bgs]: htmlentities won't encode whitespaces
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368997@lists.php.net to get a copy of this message
ID: 33534 Updated by: vrana@php.net Reported By: rt424 at hszk dot bme dot hu -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: ubuntu linux PHP Version: 4.3.10 New Comment: ' ' in the translation table is not ASCII 32 but ASCII 160. It is stated by html_entity_decode(). Previous Comments: ------------------------------------------------------------------------ [2005-07-01 15:08:06] tony2001@php.net This is expected behaviour and it should be mentioned somewhere in the docs. Reclassified as docu problem. ------------------------------------------------------------------------ [2005-07-01 14:15:37] 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: -------------- ' ' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33534&edit=1

« previous php.doc (#969368997) next »