mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Removed format characters correctly :)
This commit is contained in:
@ -70,9 +70,9 @@ abstract class TextFormat{
|
||||
*/
|
||||
public static function clean($string, $removeFormat = true){
|
||||
if($removeFormat){
|
||||
return preg_replace(["/§[0123456789abcdefklmnor]/", "/\x1b[\\(\\][[0-9;\\[\\(]+[Bm]/"], "", $string);
|
||||
return str_replace("§", "", preg_replace(["/§[0123456789abcdefklmnor]/", "/\x1b[\\(\\][[0-9;\\[\\(]+[Bm]/"], "", $string));
|
||||
}
|
||||
return preg_replace("/\x1b[\\(\\][[0-9;\\[\\(]+[Bm]/", "", $string);
|
||||
return str_replace("\x1b", "", preg_replace("/\x1b[\\(\\][[0-9;\\[\\(]+[Bm]/", "", $string));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user