-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make invalid Unicode data raise when encoding through Oj::Rails::Enco…
…der (#912) * Actually run activesupport7 tests with Oj These tests were not even loading Oj::Rails; they were definitely not actually testing the Oj rails shim. * Raise on invalid unicode in rails mode mimmicry Activesupport & JSON gem will raise an exception when trying to an encode an object containing a string with invalid byte sequences for the string's encoding. Oj correctly raises if escaspe_html_entites_in_json is enabled, but if that's disabled, the invalid byte sequence is copied directly to the output. Use the same logic to validate unicode in that case as well.
- Loading branch information
1 parent
0032fbb
commit 46b3d4d
Showing
3 changed files
with
169 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters