diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-05-02 21:06:10 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-05-02 21:06:10 +0000 |
| commit | d0a2708f912b1ceaa0f40161d874fb5c72a72f4e (patch) | |
| tree | 650324da99261d7910504dfbcaa0683c5b2121dc /packages/backend/src/core/ReactionService.ts | |
| parent | merge: save and restore UI language together with other prefs - fixes #443 (!... (diff) | |
| parent | teach ReactionService about non-ASCII emoji names (diff) | |
| download | sharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.tar.gz sharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.tar.bz2 sharkey-d0a2708f912b1ceaa0f40161d874fb5c72a72f4e.zip | |
merge: handle non-ASCII emoji names (!464)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/464
Approved-by: Leah <kevinlukej@gmail.com>
Approved-by: Ember <acomputerdog@gmail.com>
Approved-by: Marie <marie@kaifa.ch>
Diffstat (limited to 'packages/backend/src/core/ReactionService.ts')
| -rw-r--r-- | packages/backend/src/core/ReactionService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 90586b500e..e70d427e98 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -64,8 +64,8 @@ type DecodedReaction = { host?: string | null; }; -const isCustomEmojiRegexp = /^:([\w+-]+)(?:@\.)?:$/; -const decodeCustomEmojiRegexp = /^:([\w+-]+)(?:@([\w.-]+))?:$/; +const isCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@\.)?:$/; +const decodeCustomEmojiRegexp = /^:([\p{Letter}\p{Number}\p{Mark}_+-]+)(?:@([\w.-]+))?:$/; @Injectable() export class ReactionService { |