mirror of
https://github.com/eoao/cloud-mail.git
synced 2026-05-06 21:51:48 +08:00
修复<>字符导致TG消息发送失败
This commit is contained in:
@@ -26,11 +26,14 @@ export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom, tgMsgText) {
|
||||
收件人:\u200B${email.toEmail}`
|
||||
}
|
||||
|
||||
const text = (email.text || emailUtils.htmlToText(email.content))
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
|
||||
if(tgMsgText === 'show') {
|
||||
template += `
|
||||
|
||||
${email.text || emailUtils.htmlToText(email.content)}`
|
||||
${text}`
|
||||
}
|
||||
|
||||
return template;
|
||||
|
||||
Reference in New Issue
Block a user