Skip to content

Commit

Permalink
Stop slashes breaking csv report downloads
Browse files Browse the repository at this point in the history
Removes slashes from category names as:

Forward slash stops a file being created.
Backward slash stops a file being retrieved.
  • Loading branch information
MorayMySoc committed Nov 3, 2021
1 parent 8b1026c commit 27924bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- Fix removal of cached opengraph photos.
- Do not email inactive body comment users. #3587
- Look up organizational domain in DMARC checking. #3603
- Stop slash in category name breaking csv download #2679
- Admin improvements:
- Assignees of reports are now visible in admin reports list and report edit pages.
- Enable per-category hint customisation.
Expand Down
1 change: 1 addition & 0 deletions perllib/FixMyStreet/Reporting.pm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ has filename => ( is => 'rw', isa => Str, lazy => 1, default => sub {
end_date => $self->end_date,
);
$where{body} = $self->body->id if $self->body;
$where{category} =~ s/[\/\\]//g;
my $host = URI->new($self->cobrand->base_url)->host;
join '-',
$host,
Expand Down

0 comments on commit 27924bc

Please sign in to comment.