EntityNormalizer: Add colons to emoji alt text.

This makes it possible to copy them and still have them work.
This commit is contained in:
lain 2020-06-04 15:12:03 +02:00
parent 5ac2c365a7
commit f197a2aa39
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ export const addEmojis = (string, emojis) => {
const regexSafeShortCode = emoji.shortcode.replace(matchOperatorsRegex, '\\$&') const regexSafeShortCode = emoji.shortcode.replace(matchOperatorsRegex, '\\$&')
return acc.replace( return acc.replace(
new RegExp(`:${regexSafeShortCode}:`, 'g'), new RegExp(`:${regexSafeShortCode}:`, 'g'),
`<img src='${emoji.url}' alt='${emoji.shortcode}' title='${emoji.shortcode}' class='emoji' />` `<img src='${emoji.url}' alt=':${emoji.shortcode}:' title=':${emoji.shortcode}:' class='emoji' />`
) )
}, string) }, string)
} }