mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
fixed bug with chat color character (§) in punishment reasons resulting in empty reason
This commit is contained in:
parent
d9b7360f25
commit
4d449c47b6
@ -243,7 +243,7 @@ class Page {
|
|||||||
function clean($text) {
|
function clean($text) {
|
||||||
if ($text === null) return null;
|
if ($text === null) return null;
|
||||||
if (strstr($text, "\xa7") || strstr($text, "&")) {
|
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");
|
$text = htmlspecialchars($text, ENT_QUOTES, "UTF-8");
|
||||||
if (strstr($text, "\n")) {
|
if (strstr($text, "\n")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user