note 63840 deleted from function.highlight-string by nlopess
| From: | nlopess@php.net | Date: | Sun, 02 Apr 2006 16:35:20 +0000 |
| Subject: | note 63840 deleted from function.highlight-string by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107171@lists.php.net to get a copy of this message | ||
Note Submitter: corz at corzoogle dot com
----
Looks complex. To get strict xhtml 1.0, I simply run the highlighted string through str_replace,
twice..
<?php
$highlighted = str_replace('color="', 'style="color:', $highlighted);
$highlighted = str_replace('font', 'span', $highlighted);
?>
seems to work perfectly every time. also, it's very fast.
Note, *reading* a source dump of a file containing any of the make-xhtml-valid functions on this
page, won't make any sense at all!
http://corz.org/source/corz%20function%20library/source-dump.php
;o)
(or