modify munge_null to remove all control characters

This commit is contained in:
Eric A. Miller
2013-10-02 23:39:52 -04:00
parent 7c6df7cce3
commit 247f6f038d

View File

@@ -3299,15 +3299,15 @@ sub munge_port_list {
=item munge_null() =item munge_null()
Removes nulls from a string Removes control characters from a string
=cut =cut
# munge_null() - removes nulls (\0) # munge_null() - removes nulls (\0) and other control characters
sub munge_null { sub munge_null {
my $text = shift || return; my $text = shift || return;
$text =~ s/\0//g; $text =~ s/[[:cntrl:]]//g;
return $text; return $text;
} }