fix: b站用户动态emoji转换 (#5026)
Co-authored-by: zytomorrow <zytomorrow@github.com>
This commit is contained in:
@@ -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">`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user