php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42447 highlight_(string|file) does not need out most <span>
Submitted: 2007-08-27 15:59 UTC Modified: 2010-12-31 20:42 UTC
From: geoffers at gmail dot com Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.2.3 OS: Mac OS 10.4.10
Private report: No CVE-ID: None
 [2007-08-27 15:59 UTC] geoffers at gmail dot com
Description:
------------
The code highlight functions always output a surrounding <span> element 
to make all the content black. This is not needed. <code 
style="color:#000"> can be used instead.

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

highlight_string('$foo');

Expected result:
----------------
<code><span style="color: #000000">
$foo</span>
</code>

Actual result:
--------------
&t;code style="color: #000000">
$foo
</code>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-31 20:42 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: *General Issues
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 04 22:01:31 2025 UTC