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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
9 - 2 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC