diff --git a/src/helpers/emoji.ts b/src/helpers/emoji.ts
index b92c6a51b..f70edf400 100644
--- a/src/helpers/emoji.ts
+++ b/src/helpers/emoji.ts
@@ -3759,7 +3759,7 @@ export function emojify(text: string): string {
if (text !== null) {
return twemoji.parse(text, {
callback: (icon, options, variant) => {
- return '/emoji/png32/' + icon + '.png';
+ return 'emoji/png32/' + icon + '.png';
},
attributes: (icon, variant) => {
return {'data-c': variant};
diff --git a/tests/ts/emoji_helpers.ts b/tests/ts/emoji_helpers.ts
index 5d43fd3b3..ab890b0c2 100644
--- a/tests/ts/emoji_helpers.ts
+++ b/tests/ts/emoji_helpers.ts
@@ -24,7 +24,7 @@ describe('Emoji Helpers', () => {
it('emojifies with img tag', function() {
expect(emojify('hello 🐦'))
.toEqual('hello
');
+ + 'alt="🐦" src="emoji/png32/1f426.png" data-c="1f426"/>');
});
it('ignores certain codepoints', function() {
@@ -57,13 +57,13 @@ describe('Emoji Helpers', () => {
const singleEmojiClassName = 'large-emoji';
const crazy = '
';
+ + ' alt="🤪" src="emoji/png32/1f92a.png" data-c="1f92a">';
const crazyLarge = '
';
+ + '" draggable="false" alt="🤪" src="emoji/png64/1f92a.png" data-c="1f92a">';
const copyright = '
';
+ + ' alt="©️" src="emoji/png32/a9.png" data-c="a9">';
const copyrightLarge = '
';
+ + ' anotherclass" draggable="false" alt="©️" src="emoji/png64/a9.png" data-c="a9">';
it('enlarges 1 emoji', () => {
expect(process(crazy)).toEqual(crazyLarge);