From: <var...@us...> - 2009-06-25 09:15:12
|
Revision: 6957 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6957&view=rev Author: vargenau Date: 2009-06-25 09:15:10 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Use CCS instead of font tag Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-06-25 08:46:58 UTC (rev 6956) +++ trunk/lib/InlineParser.php 2009-06-25 09:15:10 UTC (rev 6957) @@ -855,14 +855,14 @@ var $_end_regexp = "%%"; function markup ($match, $body) { - $color = strtoupper(substr($match, 7, -1)); + $color = strtolower(substr($match, 7, -1)); if (strlen($color) != 7 - and in_array($color, array('RED', 'BLUE', 'GRAY', 'YELLOW', 'GREEN', 'CYAN', 'BLACK'))) + and in_array($color, array('red', 'blue', 'gray', 'yellow', 'green', 'cyan', 'black'))) { // must be a valid color name - return new HtmlElement('font', array('color' => $color), $body); + return new HtmlElement('span', array('style' => "color: $color"), $body); } elseif ((substr($color,0,1) == '#') - and (strspn(substr($color,1),'0123456789ABCDEF') == strlen($color)-1)) { - return new HtmlElement('font', array('color' => $color), $body); + and (strspn(substr($color,1),'0123456789abcdef') == strlen($color)-1)) { + return new HtmlElement('span', array('style' => "color: $color"), $body); } else { return new HtmlElement('span', array('class' => 'error'), sprintf(_("unknown color %s ignored"), substr($match, 7, -1))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |