diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-06-09 13:46:59 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-06-09 13:47:47 +0100 |
commit | f706b89ef794ed3d16c015842d6052d03a5d39ef (patch) | |
tree | 3581c6457b596872f017da89d0b524a74a680802 /perllib/FixMyStreet/Roles/ContactExtra.pm | |
parent | abc63a85b47bbc6b9e81c8256a226864ac7fe0ce (diff) |
Fix double encoding of per-category templates.
encode_json encodes to UTF-8, and then
he output was being encoded again.
Diffstat (limited to 'perllib/FixMyStreet/Roles/ContactExtra.pm')
-rw-r--r-- | perllib/FixMyStreet/Roles/ContactExtra.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Roles/ContactExtra.pm b/perllib/FixMyStreet/Roles/ContactExtra.pm index e78d9b53f..73b1d3e6a 100644 --- a/perllib/FixMyStreet/Roles/ContactExtra.pm +++ b/perllib/FixMyStreet/Roles/ContactExtra.pm @@ -46,7 +46,7 @@ sub by_categories { || (grep { $_->contact_id == $contact->get_column('id') } $_->$join_table) } @results; @ts = $rs->map_extras(@ts); - $extras{$contact->category} = encode_json(\@ts); + $extras{$contact->category} = JSON::XS->new->encode(\@ts); } return \%extras; |