mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-27 13:12:42 +01:00
Allow UTF in output again
This commit is contained in:
parent
749377106b
commit
ae1e30051d
@ -10,7 +10,7 @@ sub validate_string {
|
||||
return $string if not defined $string or not length $string;
|
||||
$max_length = 2000 if not defined $max_length;
|
||||
$string = substr $string, 0, $max_length unless $max_length <= 0;
|
||||
$string =~ s/(\P{PosixGraph})/my $ch = $1; if ($ch =~ m{[\s\x03\x02\x1d\x1f\x16\x0f]}) { $ch } else { sprintf "\\x%02X", ord $ch }/ge;
|
||||
# $string =~ s/(\P{PosixGraph})/my $ch = $1; if ($ch =~ m{[\s\x03\x02\x1d\x1f\x16\x0f]}) { $ch } else { sprintf "\\x%02X", ord $ch }/ge;
|
||||
$string = substr $string, 0, $max_length unless $max_length <= 0;
|
||||
return $string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user