Commit 86b1226b by 前端

表情格式修改

1 parent 6f1b3c41
...@@ -1575,10 +1575,19 @@ export default { ...@@ -1575,10 +1575,19 @@ export default {
} }
// 处理软文表情太大 // 处理软文表情太大
if (itm.textContent) { if (itm.textContent) {
let regErr = /<img\b/gi // let regErr = /<img\b/gi
// itm.textContent = itm.textContent.replace(
// regErr,
// `<img style="width: 18px;height 18px"`
// )
var regex0 = new RegExp('(i?)(\<img)([^\>]+\>)', 'gmi')
itm.textContent = itm.textContent
.replace(/style="[^"]+"/gi, '')
.replace(/style='[^']+'/gi, '')
itm.textContent = itm.textContent.replace( itm.textContent = itm.textContent.replace(
regErr, regex0,
`<img style="width: 18px;height 18px"` '$2 style="width: 18px;height: 18px" $3'
) )
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!