Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double encoding of per-category templates. #3058

Merged
merged 1 commit into from Jun 10, 2020

Conversation

dracos
Copy link
Member

@dracos dracos commented Jun 9, 2020

encode_json encodes to UTF-8, and then
he output was being encoded again.
@dracos dracos requested a review from chrismytton June 9, 2020 12:48
@codecov
Copy link

codecov bot commented Jun 9, 2020

Codecov Report

Merging #3058 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3058   +/-   ##
=======================================
  Coverage   83.16%   83.16%           
=======================================
  Files         246      246           
  Lines       15446    15446           
  Branches     2883     2883           
=======================================
  Hits        12845    12845           
  Misses       1689     1689           
  Partials      912      912           
Impacted Files Coverage Δ
perllib/FixMyStreet/Roles/ContactExtra.pm 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update abc63a8...f706b89. Read the comment docs.

Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still can't seem to reproduce this issue 😕

When I visit https://report.highwaysengland.co.uk/report/2148215 and pick a response template I see this:

image

That doesn't appear to be double encoded to me, unless I'm misunderstanding? Perhaps there's a difference between Mac and Windows?

@dracos
Copy link
Member Author

dracos commented Jun 9, 2020

It only happens in the inspect form update form, not the main column update form. (As that form is getting its per-category template data from a hidden data field.)

@chrismytton
Copy link
Member

It only happens in the inspect form update form, not the main column update form. (As that form is getting its per-category template data from a hidden data field.)

Ah yep, I see now!

Copy link
Member

@chrismytton chrismytton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

�

@dracos dracos merged commit ffb88ce into master Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants