#32124 [NEW]: echo sometimes strips double-quotes from tags
| From: | daniel dot kauffman at rocksolidsolutions dot org | Date: | Sun, 27 Feb 2005 10:19:06 +0000 |
| Subject: | #32124 [NEW]: echo sometimes strips double-quotes from tags | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-74620@lists.php.net to get a copy of this message | ||
From: daniel dot kauffman at rocksolidsolutions dot org
Operating system: WIN98
PHP version: 4CVS-2005-02-27 (stable)
PHP Bug Type: Output Control
Bug description: echo sometimes strips double-quotes from tags
Description:
------------
Echo sometimes strips double-quotes from tags.
It seems impossible to echo the following string literal:
<a " >
Tested on localhost with:
PHP 4.3.11-dev as CGI with Apache 1.3.33 on Windows 98
PHP 4.3.10 as CGI with Apache 1.3.33 on Windows 98
Tested remotely with:
PHP 4.3.10 as CGI with Apache 1.3.33 on Linux kernal 2.4.28
Reproduce code:
---------------
# Echo strips double-quotes from these strings... (unexpected behaviour)
echo '<a " >';
echo "<a \" >";
# But does not strip double-quotes from these strings... (exepected
behaviour)
echo '< " >';
echo "< \" >";
echo '<a a="" >';
echo "<a a=\"\" >";
# Character references are output as character references, not as literal
characters... (expected behaviour)
echo '< " >';
echo '< " >';
Expected result:
----------------
<a " ><a " >< " >< " ><a a="" ><a
a="" >< " >< " >
Actual result:
--------------
<a ><a >< " >< " ><a a="" ><a a=""
>< " >< " >
--
Edit bug report at http://bugs.php.net/?id=32124&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32124&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32124&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32124&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32124&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32124&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32124&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32124&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32124&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32124&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32124&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32124&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32124&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32124&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32124&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32124&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32124&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32124&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32124&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32124&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32124&r=mysqlcfg