fixed bug with chat color character (§) in punishment reasons resulting in empty reason

This commit is contained in:
ruan 2017-02-27 08:43:03 +02:00
parent d9b7360f25
commit 4d449c47b6
No known key found for this signature in database
GPG Key ID: 062534EE618F498C

View File

@ -243,7 +243,7 @@ class Page {
function clean($text) {
if ($text === null) return null;
if (strstr($text, "\xa7") || strstr($text, "&")) {
$text = preg_replace("/(?i)(\xa7|&)[0-9A-FK-OR]/", "", $text);
$text = preg_replace("/(?i)(\u{00a7}|&)[0-9A-FK-OR]/u", "", $text);
}
$text = htmlspecialchars($text, ENT_QUOTES, "UTF-8");
if (strstr($text, "\n")) {