#19956 [Com]: readfile()/fread() screws up HTML attribute quoting
| From: | bcd at vineyard dot net | Date: | Thu, 17 Oct 2002 16:11:49 +0000 |
| Subject: | #19956 [Com]: readfile()/fread() screws up HTML attribute quoting | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22674@lists.php.net to get a copy of this message | ||
ID: 19956
Comment by: bcd@vineyard.net
Reported By: bcd@vineyard.net
Status: Bogus
Bug Type: Output Control
Operating System: FreeBSD4.5
PHP Version: 4.2.2
New Comment:
This also happens in readfile(), which I'm sure uses fread() internally
-
Previous Comments:
------------------------------------------------------------------------
[2002-10-17 11:10:54] sander@php.net
This is probably done by the (session) url rewriter.
Either disable it in your php.ini, or fix your HTML:
<a href = "foo-bar.html">
is not valid HTML.
------------------------------------------------------------------------
[2002-10-17 11:05:51] bcd@vineyard.net
This is -very- wierd - this seems to happen when using
PHP to load HTML templates. Somewhere, in fread(), HTML attributes are
being modified ever-so-slightly:
<a href = "foo-bar.html">
gets translated to:
<a href =" foo-bar.html">
This happens for double and single-quotes, and only when whitespace
exists to the right of the equal sign of an html attribute.
If there is multiple white-space, the whitespace is all moved to the
beginning of the HTML attribute value: ie,
<a href = "foo-bar.html">
becomes:
<a href =" foo-bar.html">
There are more examples at the following URL:
http://www.vineyard.net/vni/php-test.php
PHP is setup normally on our systems (Default everything), and I've
found no related bugs in the bug archive, so I think I am the first one
to see this bug (If it is a bug?)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19956&edit=1