php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40685 '&&&' => '&&' at mb_decode_numericentity
Submitted: 2007-03-01 20:49 UTC Modified: 2011-09-24 02:22 UTC
From: dq2 at compass dot jp Assigned: hirokawa (profile)
Status: Closed Package: mbstring related
PHP Version: 4.4.6 OS: winXP
Private report: No CVE-ID: None
 [2007-03-01 20:49 UTC] dq2 at compass dot jp
Description:
------------
mb_decode_numericentity converts '&&&' string to '&&'

Reproduce code:
---------------
$s = '&';
echo mb_decode_numericentity($s, array(0, 0x10FFFF, 0, 0xFFFFFF), 'utf-8'). "\n";
$s = '&&&';
echo mb_decode_numericentity($s, array(0, 0x10FFFF, 0, 0xFFFFFF), 'utf-8'). "\n";


Expected result:
----------------
(none)
&& (where is a '&'?)

Actual result:
--------------
&
&&&

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-01 20:52 UTC] tony2001@php.net
"&&&" is not a numeric entity.
 [2007-03-01 20:59 UTC] dq2 at compass dot jp
thank you, i know '&&&' is not numeric entity,
but i find strange to reduce '&'.
and sorry expected and actuary vice versa
 [2011-09-24 02:10 UTC] hirokawa@php.net
Automatic comment from SVN on behalf of hirokawa
Revision: http://svn.php.net/viewvc/?view=revision&revision=317229
Log: fixed #40685: removed '&' in mb_decode_numericentity().
 [2011-09-24 02:11 UTC] hirokawa@php.net
Automatic comment from SVN on behalf of hirokawa
Revision: http://svn.php.net/viewvc/?view=revision&revision=317230
Log: added tests for #40685.
 [2011-09-24 02:11 UTC] hirokawa@php.net
Automatic comment from SVN on behalf of hirokawa
Revision: http://svn.php.net/viewvc/?view=revision&revision=317231
Log: MFH: fixed #40685: removed '&' in mb_decode_numericentity().
 [2011-09-24 02:20 UTC] hirokawa@php.net
Automatic comment from SVN on behalf of hirokawa
Revision: http://svn.php.net/viewvc/?view=revision&revision=317232
Log: MFH: fixed #40685: removed '&' in mb_decode_numericentity().
 [2011-09-24 02:22 UTC] hirokawa@php.net
-Status: Bogus +Status: Closed -Assigned To: +Assigned To: hirokawa
 [2011-09-24 02:22 UTC] hirokawa@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of hirokawa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ac54ec22f515195bf001734b3bc7274c8917c059
Log: fixed #40685: removed '&' in mb_decode_numericentity().
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of hirokawa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ac54ec22f515195bf001734b3bc7274c8917c059
Log: fixed #40685: removed '&' in mb_decode_numericentity().
 [2013-11-17 09:36 UTC] laruence@php.net
Automatic comment on behalf of hirokawa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ac54ec22f515195bf001734b3bc7274c8917c059
Log: fixed #40685: removed '&' in mb_decode_numericentity().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC