Exception control added to safe_input and safe_output
This commit is contained in:
parent
4eafda8b15
commit
cc27e63773
|
@ -350,6 +350,8 @@ sub pandora_trash_ascii {
|
|||
sub safe_input($) {
|
||||
my $value = shift;
|
||||
|
||||
return "" unless defined($value);
|
||||
|
||||
$value =~ s/([\x00-\xFF])/$CHR2ENT{$1}||$1/ge;
|
||||
|
||||
return $value;
|
||||
|
@ -361,6 +363,8 @@ sub safe_input($) {
|
|||
sub safe_output($) {
|
||||
my $value = shift;
|
||||
|
||||
return "" unless defined($value);
|
||||
|
||||
_decode_entities ($value, \%ENT2CHR);
|
||||
|
||||
return $value;
|
||||
|
|
Loading…
Reference in New Issue