Edit report at http://bugs.php.net/bug.php?id=42448&edit=1

 ID:                 42448
 Updated by:         [email protected]
 Reported by:        geoffers at gmail dot com
 Summary:            highlight_(string|file) does not include <pre>
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   Mac OS 10.4.10
 PHP Version:        5.2.3
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2007-08-27 16:04:30] geoffers at gmail dot com

Description:
------------
The code highlight functions should output a surrounding <pre> element,


as the content's meaning may be changed by normalising whitespace. A 

non-breaking space has a different meaning to whitespace having 

importance.



e.g., the two are different strings:

- 'This is a

test'

- 'This is a test'

Reproduce code:
---------------
<?php



highlight_string('foo  bar');

Expected result:
----------------
&<code><span style="color: #000000">

foo&nbsp;&nbsp;bar</span;

</code>

Actual result:
--------------
<pre><code><span style="color: #000000">

foo  bar</span>

</code></pre>


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=42448&edit=1

Reply via email to