Closed voomify closed 8 years ago
Thanks, @voomify !
I've released v0.2.1 that includes this PR.
Excellent. Thank you.
On Tue, Dec 1, 2015 at 11:07 AM, Leon Miller-Out notifications@github.com wrote:
I've released v0.2.1 that includes this PR.
— Reply to this email directly or view it on GitHub https://github.com/singlebrook/utf8-cleaner/pull/24#issuecomment-161014706 .
There was a bug in this PR that causes valid percent characters to be improperly stripped from JSON bodies. I will be submitting a new PR to fix soon.
We have a webhook (Shopify) that is posting json using content-type application/json. It fails in the rack middleware with Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT). After searching around I found your gem (thank you). I added content-type application/json to the body sanitization case. Now I'm able to parse json properly. Since json is by default UTF-8, I believe this solution is general purpose and could be pulled.