修复<>字符导致TG消息发送失败
This commit is contained in:
@@ -26,11 +26,14 @@ export default function emailMsgTemplate(email, tgMsgTo, tgMsgFrom, tgMsgText) {
|
|||||||
收件人:\u200B${email.toEmail}`
|
收件人:\u200B${email.toEmail}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const text = (email.text || emailUtils.htmlToText(email.content))
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
|
||||||
if(tgMsgText === 'show') {
|
if(tgMsgText === 'show') {
|
||||||
template += `
|
template += `
|
||||||
|
|
||||||
${email.text || emailUtils.htmlToText(email.content)}`
|
${text}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
|
|||||||
Reference in New Issue
Block a user