Exception control added to safe_input and safe_output

This commit is contained in:
fbsanchez 2018-02-13 10:59:00 +01:00
parent 4eafda8b15
commit cc27e63773
1 changed files with 6 additions and 2 deletions

View File

@ -349,7 +349,9 @@ sub pandora_trash_ascii {
########################################################################
sub safe_input($) {
my $value = shift;
return "" unless defined($value);
$value =~ s/([\x00-\xFF])/$CHR2ENT{$1}||$1/ge;
return $value;
@ -360,7 +362,9 @@ sub safe_input($) {
########################################################################
sub safe_output($) {
my $value = shift;
return "" unless defined($value);
_decode_entities ($value, \%ENT2CHR);
return $value;