php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32124 echo sometimes strips double-quotes from tags
Submitted: 2005-02-27 11:19 UTC Modified: 2005-02-27 20:55 UTC
From: daniel dot kauffman at rocksolidsolutions dot org Assigned: sniper (profile)
Status: Closed Package: Output Control
PHP Version: 4CVS-2005-02-27 (stable) OS: *
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: daniel dot kauffman at rocksolidsolutions dot org
New email:
PHP Version: OS:

 

 [2005-02-27 11:19 UTC] daniel dot kauffman at rocksolidsolutions dot org
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 '< &quot; >';
echo '< &#34; >';

Expected result:
----------------
<a " ><a " >< " >< " ><a a="" ><a a="" >< &quot; >< &#34; >

Actual result:
--------------
<a  ><a  >< " >< " ><a a="" ><a a="" >< &quot; >< &#34; >

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-27 11:27 UTC] daniel dot kauffman at rocksolidsolutions dot org
PHP is running as Apache module in each case.
 [2005-02-27 12:15 UTC] tony2001@php.net
Use "View source" and see the expected results.
That's your browser's problem.
 [2005-02-27 13:59 UTC] sniper@php.net
I can actually reproduce this, but I have to try again when I get home..the php version installed on my laptop is not the most recent CVS checkout. :)

 [2005-02-27 20:55 UTC] daniel dot kauffman at rocksolidsolutions dot org
Firefox 0.9.2 continues to exhibit described behaviour even after php is disabled.

IE 6.0.2800.1106, Opera 7.53, and Curl 7.13.0 do not exhibit described behaviour.

So, this appears to be browser-related.

sniper@php.net -- are you using Firefox?
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 10:03:37 2021 UTC