修复<>字符导致TG消息发送失败

This commit is contained in:
eoao
2025-10-25 08:35:00 +08:00
parent ff42f406a5
commit c83b86c392

View File

@@ -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, '&lt;')
.replace(/>/g, '&gt;');
if(tgMsgText === 'show') {
template += `
${email.text || emailUtils.htmlToText(email.content)}`
${text}`
}
return template;