Merge branch '1913-CDE-Tools' into 'develop'
Exception control added to safe_input and safe_output See merge request artica/pandorafms!1293
This commit is contained in:
commit
3af0e812c2
|
@ -349,7 +349,9 @@ sub pandora_trash_ascii {
|
||||||
########################################################################
|
########################################################################
|
||||||
sub safe_input($) {
|
sub safe_input($) {
|
||||||
my $value = shift;
|
my $value = shift;
|
||||||
|
|
||||||
|
return "" unless defined($value);
|
||||||
|
|
||||||
$value =~ s/([\x00-\xFF])/$CHR2ENT{$1}||$1/ge;
|
$value =~ s/([\x00-\xFF])/$CHR2ENT{$1}||$1/ge;
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
@ -360,7 +362,9 @@ sub safe_input($) {
|
||||||
########################################################################
|
########################################################################
|
||||||
sub safe_output($) {
|
sub safe_output($) {
|
||||||
my $value = shift;
|
my $value = shift;
|
||||||
|
|
||||||
|
return "" unless defined($value);
|
||||||
|
|
||||||
_decode_entities ($value, \%ENT2CHR);
|
_decode_entities ($value, \%ENT2CHR);
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
Loading…
Reference in New Issue