Merged
Conversation
Contributor
|
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## main #5038 +/- ##
==========================================
- Coverage 75.80% 75.78% -0.03%
==========================================
Files 921 921
Lines 16307 16316 +9
==========================================
+ Hits 12362 12365 +3
- Misses 3945 3951 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3 tasks
spacedmonkey
approved these changes
Oct 28, 2020
Contributor
spacedmonkey
left a comment
There was a problem hiding this comment.
This looks great. We have great options for refactoring later.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Turns out the mbstring polyfill we include is UTF-8 centric and not suitable for the UTF-16 conversion we are doing. That's why this decoding currently silently fails (i.e. leaves the string unchanged) when the native mbstring extension is not available (which can be the case on some systems).
For this reason, I am putting this behind a feature flag for now until this edge case is addressed.
Note: the mbstring polyfill is still needed because we need UTF-8 conversion for the AMP output on the frontend.
Relevant Technical Choices
To-do
User-facing changes
N/A
Testing Instructions
Verify that encoding only happens when feature flag is turned on.
The decoding always happens.
See #4805