#5310 Fixes for attachments which contain emojis in their names#5382
#5310 Fixes for attachments which contain emojis in their names#5382
Conversation
| } else { | ||
| // regex from https://stackoverflow.com/a/69661174/3091318 | ||
| encodedStr = encodedStr.replace(/(?![*#0-9]+)[\p{Emoji}\p{Emoji_Modifier}\p{Emoji_Component}\p{Emoji_Modifier_Base}\p{Emoji_Presentation}]/gu, '') | ||
| } |
There was a problem hiding this comment.
This is nice - I tried to find a reference for regex in Kotlin but I do not see any relevant documentation/reference material that Kotlin supports \p{Emoji_Presentation} or similar, unlike javascript which has rich support with it. So with that, we might end up using emoji-unicode ranges which again may contain an incomplete range of emojis.
@sosnovsky Do you allow me to fix both #5308 and #5309 by reusing the regex on line 713?
There was a problem hiding this comment.
Yeah, I tried to use the same regex on FES for allowing emojis, but unfortunately Kotlin doesn't support these \p keywords.
Let me finish this PR, then I'll check possible solution for #5308 and #5309 on FES side, and if there won't be a simple way to allow emojis and other symbols in recipient names - I'll notify you that you can work on stripping emojis from recipient names on browser extension side.
# Conflicts: # package-lock.json # package.json
# Conflicts: # package-lock.json
This PR fixes issues for attachments which contain emojis in their filenames
close #5310
close #5345
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):