php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40093 htmlentities ENT_QUOTES behaves like ENT_COMPAT
Submitted: 2007-01-10 17:55 UTC Modified: 2007-01-18 01:00 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: dan dot marra at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.2.0 OS: linux (fedora core 6)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dan dot marra at gmail dot com
New email:
PHP Version: OS:

 

 [2007-01-10 17:55 UTC] dan dot marra at gmail dot com
Description:
------------
The summary prtty much explains it best.

Here is the configure line:

 	 './configure' '--with-apxs2=/usr/sbin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--enable-gd-native-ttf' '--enable-wddx' '--with-zip' '--with-zlib' '--with-config-file-path=/etc'

Reproduce code:
---------------
<?PHP

echo htmlentities(" this will work \"as expected\"");
echo htmlentities(" this will 'break'");

?>

Expected result:
----------------
(note, this is while viewing source of the page)

this will work &#34;as expected&#34;
this will &#39;break&#39;

Actual result:
--------------
this will work &#34;as expected&#34;
this will 'break'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-10 17:56 UTC] dan dot marra at gmail dot com
i'm sorry, this is the ACTUAL reproduceable code:

<?PHP

echo htmlentities(" this will work \"as expected\"", ENT_QUOTES);
echo htmlentities(" this will 'break'", ENT_QUOTES);

?>
 [2007-01-10 18:26 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

Seems to work as expected in the latest CVS.
 [2007-01-18 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 10:05:45 2022 UTC