diff --git a/contrib/log_db/theme.php b/contrib/log_db/theme.php
index 56aaa2ab..94f273b4 100644
--- a/contrib/log_db/theme.php
+++ b/contrib/log_db/theme.php
@@ -20,7 +20,7 @@ class LogDatabaseTheme extends Themelet {
"".html_escape($event['username'])."".
"";
}
- $table .= "
".html_escape($event['message'])." | ";
+ $table .= "".$this->scan_entities(html_escape($event['message']))." | ";
$table .= "\n";
}
$table .= "";
@@ -42,5 +42,15 @@ class LogDatabaseTheme extends Themelet {
default: return "";
}
}
+
+ protected function scan_entities($line) {
+ $line = preg_replace_callback("/Image #(\d+)/s", array($this, "link_image"), $line);
+ return $line;
+ }
+
+ protected function link_image($id) {
+ $iid = int_escape($id[1]);
+ return "Image #$iid";
+ }
}
?>