</font color> - 08/20/2002 1:04 AM
The color markup tag translates its closing tag to </font color>. Is this standards-compliant?
posted by Dave_L:
So should that be considered a bug?
posted by Gardener:
Other markup tags also have the </font> tag so the undo_markup function won't be able to distinguish which one is used for the color tag.
code:
$Body =~ s/\[$lang{'COLOR_RED'}\](.*?)\[\/$lang{'COLOR_RED'}\]/<font color=red>$1<\/font>/ig; # do
$Body =~ s/<font color=red>(.*?)<\/font>/\[$lang{'COLOR_RED'}\]$1\[\/$lang{'COLOR_RED'}\]/ig; # undo
code:
$matches[0][$i] = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","</font color>",$matches[0][$i]);
code:
$matches[0][$i] = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","<!-- color --></font>",$matches[0][$i]);
code:
$Body = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","</font color>",$Body);
code:
$Body = preg_replace("/\[\/{$ubbt_lang['COLOR']}\]/","<!-- color --></font>",$Body);
code:
$Body = preg_replace("/<\/font color>/i","[/{$ubbt_lang['COLOR']}]",$Body);
code:
$Body = preg_replace("/<!-- color --><\/font>/i","[/{$ubbt_lang['COLOR']}]",$Body);