diff --git a/bans.php b/bans.php
index a948761..a215613 100644
--- a/bans.php
+++ b/bans.php
@@ -66,7 +66,7 @@
|
|
- |
+ |
|
');
echo('Banned by: ' . $banner . ' ');
- echo('Reason: ' . $reason . ' ');
+ echo('Reason: ' . clean($reason) . ' ');
echo('Banned on: ' . $time . ' ');
if ($row['until'] > 0) {
echo('Banned until: ' . $until . ' ');
diff --git a/includes/page.php b/includes/page.php
index beeb6fd..c69fde0 100644
--- a/includes/page.php
+++ b/includes/page.php
@@ -36,4 +36,17 @@ function millis_to_date($millis) {
date_default_timezone_set("UTC");
return date('F j, Y, g:i a', $millis / 1000);
}
+
+/**
+ * Removes chat colors from a string.
+ * @param $text
+ */
+function clean($text) {
+ if (strstr($text, "\xa7") || strstr($text, "&")) {
+ $regex = "/(?i)(\xa7|&)[0-9A-FK-OR]/";
+ return preg_replace($regex, "", $text);
+ }
+ return $text;
+}
+
?>
diff --git a/mutes.php b/mutes.php
index 0bdbe68..f61178d 100644
--- a/mutes.php
+++ b/mutes.php
@@ -33,7 +33,7 @@
|
|
|
- |
+ |
|
| |
|
- |
+ |
|