From:             tikitiki at mybboard dot com
Operating system: Not Applicable
PHP version:      5.2.0
PHP Bug Type:     Unknown/Other Function
Bug description:  highlight_string function removes slashes in some cases

Description:
------------
The slashes (\) gets removed in some instances with invalid php code. In
the below reproduce code, the \ gets removed.

The PHP Version isn't applicable, but I had to put 5.2.0 because if I set
it to 'Irrelevant' I would get this error 'This category requires you to
pick a PHP version.'

I understand that this is far fetched, but it should ATLEAST show up.

Reproduce code:
---------------
<?php
$string = '<?php
$a = 2;
\
$c = 5;
?>';

echo highlight_string($str, true);
?>

Expected result:
----------------
<?php
$a = 2;
\
$c = 5;
?>

Actual result:
--------------
<?php
$a = 2;

$c = 5;
?>

-- 
Edit bug report at http://bugs.php.net/?id=39783&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39783&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39783&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39783&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39783&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39783&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39783&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39783&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39783&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39783&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39783&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39783&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39783&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39783&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39783&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39783&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39783&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39783&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39783&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39783&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39783&r=mysqlcfg

Reply via email to