Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 757e42d

Browse files
authored
Merge pull request #1458 from pafcu/emoji-fix2
Ignore VS16 char in RTE
2 parents e0e5d51 + 8266286 commit 757e42d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/RichText.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,14 @@ function unicodeToEmojiUri(str) {
6767
// if the unicodeChar doesnt exist just return the entire match
6868
return unicodeChar;
6969
} else {
70+
// Remove variant selector VS16 (explicitly emoji) as it is unnecessary and leads to an incorrect URL below
71+
if(unicodeChar.length == 2 && unicodeChar[1] == '\ufe0f') {
72+
unicodeChar = unicodeChar[0];
73+
}
74+
7075
// get the unicode codepoint from the actual char
7176
unicode = emojione.jsEscapeMap[unicodeChar];
77+
7278
return emojione.imagePathSVG+unicode+'.svg'+emojione.cacheBustParam;
7379
}
7480
});

0 commit comments

Comments
 (0)