HomePhabricator
Diffusion Comm ec7a38d858e7

[lib] Source onlyEmojiRegex from emoji-regex package

Description

[lib] Source onlyEmojiRegex from emoji-regex package

Summary:
The initial motivation for this diff was this security advisory I received from GitHub staff.

A secondary motivation is that this RegEx no longer works on all modern emoji. In particular, it's not matching "πŸ§‘πŸ½β€πŸŽ€πŸ‘©πŸΌβ€πŸ’ΌπŸ‘©πŸ½β€πŸŽ€πŸ§‘β€πŸŒΎπŸ‘¨πŸΏβ€πŸŒΎ".

I think I initially copy-pasted this RegEx from the emoji-regex package, but I'm not 100% sure. Either way, this new approach will allow us to more easily stay updated as new emojis are added.

Test Plan: Open web client and test various emoji sequences, including the modern one above that didn't work before

Reviewers: KatPo, palys-swm

Reviewed By: KatPo, palys-swm

Subscribers: zrebcu411, Adrian

Differential Revision: https://phabricator.ashoat.com/D456

Details

Provenance
Ashoat Tevosyan <ashoat@gmail.com>Authored on Nov 30 2020, 8:33 AM
Reviewer
β€’ KatPo
Differential Revision
Restricted Differential Revision
Parents
rCOMM867326547a6e: [native] Dismiss keyboard in relationship list
Branches
Unknown
Tags
Unknown