#34355 [Bgs]: highlight_file not closing <font>'s properly
| From: | tbellefy at yahoo dot com | Date: | Sat, 03 Sep 2005 19:00:04 +0000 |
| Subject: | #34355 [Bgs]: highlight_file not closing <font>'s properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84485@lists.php.net to get a copy of this message | ||
ID: 34355
User updated by: tbellefy at yahoo dot com
Reported By: tbellefy at yahoo dot com
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: FreeBSD 4.7-RELEASE-p28 #40
PHP Version: 5.0.4
New Comment:
I understand the impact a change would have on existing applications.
That's an affect of new versions. I also understand that it would
produce more html output.
However, I feel the benefits of having cleaner html output far outweigh
the cons of the situation.
I use PHP because it is constantly stiving to improve itself. Maybe
this issue isn't a BUG per-se. How about we call it an upgrade to the
aesthetics and visual interpretation of the readable output by humans.
Thanks for responding. Keep up the great work!!
Tim
Previous Comments:
------------------------------------------------------------------------
[2005-09-03 12:27:32] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Currently the output is fine changing this would create
much more HTML than often needed. (and break apps already
parsing the output...)
------------------------------------------------------------------------
[2005-09-03 09:00:35] tbellefy at yahoo dot com
Description:
------------
*After clicking submit the first time, I noticed that bug #26629 is
similar but I have provided a full description:
I think I found a bug in the highlight_file function not closing the
</font> tags properly when output to a sting.
It seems PHP is adding the closing </font> tag just before it needs to
add another starting <font> tag. This causes a problem when trying to
parse the string with:
$lines = split("<br />", $source);
In this example, there are several and newlines BEFORE the
closing </font> tag.
Possible fix could be to add a closing </font> tag at the end of every
line. Make sure the <br /> is the last thing on every line.
OS: FreeBSD 4.7-RELEASE-p28 #40
PHP: 5.0.4
Reproduce code:
---------------
1. Bug
http://miicore.com/bug/bug.php
http://miicore.com/bug/bug.phps
2. Somefile
http://miicore.com/bug/somefile.php
http://miicore.com/bug/somefile.phps
Expected result:
----------------
1. This is what I think should be happening here.
http://miicore.com/bug/fixed_output.php
http://miicore.com/bug/fixed_output.phps
Actual result:
--------------
1. Bug
http://miicore.com/bug/bug.php
http://miicore.com/bug/bug.phps
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34355&edit=1