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

Commit 8266286

Browse files
committed
Ignore VS16 char in RTE
Signed-off-by: Stefan Parviainen <[email protected]>
1 parent 2ba0a80 commit 8266286

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)