#26629 [Opn->Fbk]: Inconsistent handle of \n in highlight_string and highlight_file

From: Date: Mon, 15 Dec 2003 14:09:49 +0000
Subject: #26629 [Opn->Fbk]: Inconsistent handle of \n in highlight_string and highlight_file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52091@lists.php.net to get a copy of this message
 ID:          26629
 Updated by:  sniper@php.net
 Reported By: vrana@php.net
-Status:      Open
+Status:      Feedback
 Bug Type:    Strings related
 PHP Version: 4.3.3
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


And is this with PHP 5 or 4 ??? You're referring to ZendEngine 2 but
the version in this report is 4.3.3 ????

(I would expect that people who have @php.net address should know HOW
to report bugs..)



Previous Comments:
------------------------------------------------------------------------

[2003-12-15 05:57:24] vrana@php.net

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 this bug report at http://bugs.php.net/?id=26629&edit=1


Thread (10 messages)

« previous php.bugs (#52091) next »