Commit: 1cba0f8472e9d3c2826bc581621731579232190d
Author: Niel Archer | Date: 2009-12-25 04:24:37 +0000
diff --git a/views/logs/view.html.php b/views/logs/view.html.php
index a83b258..ffccd76 100644
--- a/views/logs/view.html.php
+++ b/views/logs/view.html.php
@@ -4,11 +4,16 @@
$hash = abs(crc32($line['user']));
$rgb = array($hash % 255, $hash % 255, $hash % 255);
$rgb[$hash % 2] = 0;
+ $message = preg_replace(
+ '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
+ '<a href="$1">$1</a>',
+ $h($line['message'])
+ );
?>
<tr>
<td class="time"><?=$line['time'];?></td>
<td class="user" style="color: rgb(<?=implode(',' , $rgb)?>);"><?=$line['user']?></td>
- <td class="message"><?= $h($line['message']); ?></td>
+ <td class="message"><?php echo $message; ?></td>
</tr>
<?php endforeach; ?>
</table>