True, it would be nice if the correct html was in the database as well. And the html comment should work perfectly OK.
Here's the code for this if anyone wants it, do the following in ubbt.inc.php:
Find this line:
code:
$matches[0][$i] = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","</font color>",$matches[0][$i]);
Change it to this:
code:
$matches[0][$i] = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","<!-- color --></font>",$matches[0][$i]);
Find this line:
code:
$Body = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","</font color>",$Body);
Change it to this:
code:
$Body = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","<!-- color --></font>",$Body);
Find this line:
code:
$Body = preg_replace("/<\/font color>/i","[/{$ubbt_lang['COLOR']}]",$Body);
And change it to this:
code:
$Body = preg_replace("/<!-- color --><\/font>/i","[/{$ubbt_lang['COLOR']}]",$Body);
But after this is done, the color markup won't be parsed correctly when changing posts done with the old way. But I guess it should work by adding the given lines instead of replacing the old line, that way even old posts should be parsed correctly during editing. Haven't tested it though.