1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-09 00:20:08 +00:00

Encoded the chars in ChatUtil::gradient()

This commit is contained in:
Tim Düsterhus 2011-12-17 18:40:20 +01:00
parent 966a4f57d3
commit a8a69eaaa9

View File

@ -39,7 +39,7 @@ public static function gradient($string, $start, $end) {
$result = ''; $result = '';
for ($i = 0, $max = count($string); $i < $max; $i++) { for ($i = 0, $max = count($string); $i < $max; $i++) {
$result .= '<span style="color:rgb('.(($start >> 16 & 255) - $i * $r).','.(($start >> 8 & 255) - $i * $g).','.(($start & 255) - $i * $b).')">'.$string[$i].'</span>'; $result .= '<span style="color:rgb('.(($start >> 16 & 255) - $i * $r).','.(($start >> 8 & 255) - $i * $g).','.(($start & 255) - $i * $b).')">'.StringUtil::encodeHTML($string[$i]).'</span>';
} }
return $result; return $result;