From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      4.3.3
PHP Bug Type:     Strings related
Bug description:  Inconsistent handle of \n in highlight_string and highlight_file

Description:
------------
highlight.keyword isn't used in strings without variables for \n and
similar. It is used in strings with variables (e.g. "$a\n").

(The problem is in file /ZendEngine2/zend_highlight.c.)

Reproduce code:
---------------
highlight_string('<?php echo "a\n"; ?>');


Expected result:
----------------
<code><font color="#000000">
<font color="#0000BB">&lt;?php </font><font color="#007700">echo
</font><font color="#DD0000">"a</font><font color="#007700">\n</font><font
color="#DD0000">"</font><font color="#007700">; </font><font
color="#0000BB">?&gt;</font>
</font>
</code>

Actual result:
--------------
<code><font color="#000000">
<font color="#0000BB">&lt;?php </font><font color="#007700">echo
</font><font color="#DD0000">"a\n"</font><font color="#007700">;
</font><font color="#0000BB">?&gt;</font>
</font>
</code>

-- 
Edit bug report at http://bugs.php.net/?id=26629&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26629&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26629&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26629&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26629&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26629&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26629&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26629&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26629&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26629&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26629&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26629&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26629&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26629&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26629&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26629&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26629&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26629&r=float

Reply via email to