fix: weibo emoji dom update (#5056)
This commit is contained in:
@@ -61,7 +61,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
const link = `https://weibo.com/${uid}/${item.mblog.bid}`;
|
||||
let description = weiboUtils.format(item.mblog);
|
||||
const title = description.replace(/<img.*?>/g, '[图片]').replace(/<.*?>/g, '');
|
||||
const title = description.replace(/<img[\s\S]*?>/g, '[图片]').replace(/<.*?>/g, '');
|
||||
const pubDate = isDataOK ? new Date(data.created_at).toUTCString() : date(item.mblog.created_at, 8);
|
||||
|
||||
// 视频的处理
|
||||
|
||||
@@ -5,7 +5,7 @@ const weiboUtils = {
|
||||
// 长文章的处理
|
||||
let temp = (status.longText && status.longText.longTextContent.replace(/\n/g, '<br>')) || status.text || '';
|
||||
// 表情图标转换为文字
|
||||
temp = temp.replace(/<span class="url-icon"><img.*?alt="?(.*?)"? .*?\/><\/span>/g, '$1');
|
||||
temp = temp.replace(/<span class="url-icon"><img.*?alt="?(.*?)"? [\s\S]*?\/><\/span>/g, '$1');
|
||||
// 去掉外部链接的图标
|
||||
temp = temp.replace(/<span class=["|']url-icon["|']>.*?<\/span><span class="surl-text">(.*?)<\/span>/g, '$1');
|
||||
// 去掉乱七八糟的图标
|
||||
|
||||
Reference in New Issue
Block a user