#40093 [Opn->Fbk]: htmlentities ENT_QUOTES behaves like ENT_COMPAT

From: Date: Wed, 10 Jan 2007 18:26:27 +0000
Subject: #40093 [Opn->Fbk]: htmlentities ENT_QUOTES behaves like ENT_COMPAT
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107438@lists.php.net to get a copy of this message
ID: 40093 Updated by: iliaa@php.net Reported By: dan dot marra at gmail dot com -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: linux (fedora core 6) PHP Version: 5.2.0 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2007-01-10 17:56:38] 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 17:55:14] 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' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40093&edit=1

« previous php.bugs (#107438) next »