From: tbellefy at yahoo dot com Operating system: FreeBSD 4.7-RELEASE-p28 #40 PHP version: 5.0.4 PHP Bug Type: Scripting Engine problem Bug description: highlight_file not closing <font>'s properly
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 bug report at http://bugs.php.net/?id=34355&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34355&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34355&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34355&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34355&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34355&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34355&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34355&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34355&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34355&r=support Expected behavior: http://bugs.php.net/fix.php?id=34355&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34355&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34355&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34355&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34355&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34355&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34355&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34355&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34355&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34355&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34355&r=mysqlcfg