[ticket/17655] Do not render raw codepoint shortcodes as emoji#6992
Open
ECYaz wants to merge 1 commit into
Open
[ticket/17655] Do not render raw codepoint shortcodes as emoji#6992ECYaz wants to merge 1 commit into
ECYaz wants to merge 1 commit into
Conversation
The Emoji plugin renders sequences of hexadecimal digits between colons such as ":123c:" as emoji images of the corresponding codepoint. Such sequences commonly appear as segments of IPv6 addresses, mangling the address and causing failing image requests to the emoji CDN which slow down the page for the reader. Add a filter to the EMOJI tag that rejects these shortcodes so they remain plain text. Emoji shortnames such as ":joy:" and Unicode emoji are unaffected. The ":1234:" shortname is rejected as well, as it cannot be told apart from a segment of an IPv6 address. PHPBB-17655
|
The attempt to merge branch
A separate PR will be needed to merge |
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.
Checklist:
Tracker ticket:
https://tracker.phpbb.com/browse/PHPBB-17655
The Emoji plugin renders sequences of hexadecimal digits between colons such as
:123c:as emoji images of the corresponding codepoint. Such sequences commonly appear as segments of IPv6 addresses, so posting an address like2a09:bac3:616e:123c::1d1:f0mangles the text and generates failing image requests to the emoji CDN, which slow down the page for the reader.This adds a filter to the EMOJI tag that rejects these raw codepoint shortcodes so they remain plain text. Emoji shortnames such as
:joy:, Unicode emoji and regular smilies are unaffected, verified by new test cases. The:1234:shortname is rejected as well since it cannot be told apart from a segment of an IPv6 address.