Skip to content

Commit

Permalink
fix: display_structured_response syntax (#6948)
Browse files Browse the repository at this point in the history
  • Loading branch information
dipietroR authored Jun 24, 2022
1 parent 668454e commit 525ad83
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10371,16 +10371,13 @@ sub display_structured_response($)
$jsonp = param('callback');
}

if (defined $jsonp) {
$jsonp =~ s/[^a-zA-Z0-9_]//g;
}

my $status = $request_ref->{status};
if (defined $status) {
print header ( -status => $status );
}

if (defined $jsonp) {
$jsonp =~ s/[^a-zA-Z0-9_]//g;
print header( -type => 'text/javascript', -charset => 'utf-8', -access_control_allow_origin => '*' ) . $jsonp . "(" . $data . ");" ;
}
else {
Expand Down

0 comments on commit 525ad83

Please sign in to comment.