News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

<font> tags!

Started by Daniel15, June 24, 2006, 04:51:22 AM

Previous topic - Next topic

Daniel15

I just noticed that the PHP syntax highlighting used with the [ code ] BBCode generates <font> tags! (which are deprecated in XHTML, I think) Have a look:


<?php
 
echo 'This is a test';
?>



Produces:

<div class="codeheader">Code:</div><div class="code"><font color="#000000"><font color="#007700">&lt;?</font><font color="#0000BB">php<br />&nbsp;</font><font color="#007700">echo&nbsp;</font><font color="#DD0000">&#039;This&nbsp;is&nbsp;a&nbsp;test&#039;</font><font color="#007700">;<br /></font><font color="#0000BB">?&gt;</font></font><br /></div>


I believe that it should be using <span> tags instead?

EDIT: Strange, it uses <span> tags here. My testing SMF 1.1 RC2 installation uses <font> tags?!
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Thantos

SMF uses the PHP function highlight_string() which uses font tags on PHP 4 and span tags on PHP 5.

http://www.php.net/manual/en/function.highlight-string.php

Daniel15

Quote from: Thantos on June 24, 2006, 09:24:47 AM
SMF uses the PHP function highlight_string() which uses font tags on PHP 4 and span tags on PHP 5.

http://www.php.net/manual/en/function.highlight-string.php

Oh, right. I should have checked that.
Anyways, I suppose you can close this topic then ;)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Advertisement: