#46256 [Bgs]: htmlentities precedes with Â
| From: | jordan dot w dot bradley at gmail dot com | Date: | Wed, 08 Oct 2008 17:35:40 +0000 |
| Subject: | #46256 [Bgs]: htmlentities precedes with  | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129562@lists.php.net to get a copy of this message | ||
ID: 46256
User updated by: jordan dot w dot bradley at gmail dot com
Reported By: jordan dot w dot bradley at gmail dot com
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Gentoo Linux
PHP Version: 5.2.6
New Comment:
Ahh I see. Now it works.
Previous Comments:
------------------------------------------------------------------------
[2008-10-08 17:21:06] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
That's because the nbsp is actually encoded in UTF-8. Use the charset
parameter to htmlentities() to tell it is us UTF-8.
------------------------------------------------------------------------
[2008-10-08 17:00:53] jordan dot w dot bradley at gmail dot com
Description:
------------
When htmlentities is called, it puts a  before any
I'm using php-5.2.6-r7 which is the latest in Gentoo's portage tree.
Reproduce code:
---------------
print $_POST['breadcrumb_seperator'].'<br />';
print htmlentities($_POST['breadcrumb_seperator']);
Expected result:
----------------
>>
>>
Actual result:
--------------
>>
 >>Â
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46256&edit=1