fix: b站用户动态emoji转换 (#5026)

Co-authored-by: zytomorrow <zytomorrow@github.com>
This commit is contained in:
zytomorrow
2020-06-22 11:45:03 +08:00
committed by GitHub
co-authored by zytomorrow
parent 0cf12554b0
commit 0be6cc749f
+2 -2
View File
@@ -138,11 +138,11 @@ module.exports = async (ctx) => {
const getIframe = (data) => (!disableEmbed && data && data.aid ? `<br><br>${utils.iframe(data.aid)}<br>` : '');
// emoji
let data_content = '';
let data_content = getDes(data);
if (item.display.emoji_info) {
const emoji = item.display.emoji_info.emoji_details;
emoji.forEach(function (item) {
data_content = getDes(data).replace(
data_content = data_content.replace(
new RegExp(`\\${item.text}`, 'g'),
`<img alt="${item.text}" src="${item.url}"style="margin: -1px 1px 0px; display: inline-block; width: 20px; height: 20px; vertical-align: text-bottom;" title="" referrerpolicy="no-referrer">`
);