Repository navigation
Comments: Encode emoji for utf8mb3 comment columns #12673
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
Open
bazza
wants to merge
21
commits into
WordPress:trunk
Choose a base branch
from
bazza:65700-encode-emoji-comments
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3e4a182
Comments: Encode emoji for utf8mb3 comment columns in wp_insert_comme…
4d26752
Fix test_wp_encode_emoji_in_fields_ignores_fields_missing_from_data()…
fb1a193
Merge branch 'trunk' into 65700-encode-emoji-comments
bazza ba90c43
Merge remote-tracking branch 'upstream/trunk' into 65700-encode-emoji…
sirreal a807662
Update @since for _wp_encode_emoji_in_fields() to 7.2.0.
sirreal c105494
Add @ignore to _wp_encode_emoji_in_fields() docblock.
sirreal 29eb712
Compare emoji in comment lookups as stored.
sirreal a1cea18
Rename and document the four-byte character field helper.
sirreal ff855fd
Encode four-byte UTF-8 characters in utf8mb3 post and comment fields.
sirreal 0ae0b3f
Assert comment insertion succeeds in utf8mb4 control test.
sirreal fd913e7
Compare comment authors as stored in comment_exists().
sirreal 4141e89
Preserve encodable comment fields when retrying an insert.
sirreal 032e0e9
Render emoji sequences that mix literal characters and character refe…
sirreal ce022c1
Validate the stored length of comment authors and content.
sirreal 77d634c
Revert "Render emoji sequences that mix literal characters and charac…
sirreal 9aacc96
Restore post emoji encoding to the PR base.
sirreal ea68872
Require utf8mb4 columns for the comment round-trip test.
sirreal a231c93
Preserve comment retry cleanup for unencoded fields.
sirreal cd3cb51
Apply comment field limits to the encoded values.
sirreal 15c0c44
Separate HTML transformation; use mb_encode_numericentity()
dmsnell 58eb8c8
Polyfill mb_encode_numericentity() and mb_substitute_character()
dmsnell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going forward this will help, but it’s worth pointing out that this abandons a lot of existing data. there is no general easy solution for this in the database without tradeoffs.
none of these are great, and abandoning the existing data is probably fair enough given that the current state of things is that they don’t work.