This commit is contained in:
Matteo Manzinello 2020-07-10 13:09:04 +02:00
parent 318633c354
commit 9fb1ebfc0c
6 changed files with 15 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/mailgo.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -562,6 +562,8 @@ var mailgoRender = function mailgoRender() {
// mailgo mail
if (type === MAIL_TYPE) {
var _config5, _config6;
// if the element href=^"mailto:"
if (mailgo.href && mailgo.href.toLowerCase().startsWith(MAILTO)) {
mail = decodeURIComponent(mailgo.href.split("?")[0].split(MAILTO)[1].trim());
@ -585,13 +587,17 @@ var mailgoRender = function mailgoRender() {
subject = mailgo.getAttribute("data-subject"); // body = data-body
bodyMail = mailgo.getAttribute("data-body");
} // validate the email address
} // TODO test this
if (!validateEmails(mail.split(","))) return; // if cc, bcc is not valid cc, bcc = ""
if (typeof ((_config5 = config) === null || _config5 === void 0 ? void 0 : _config5.validateEmail) === "undefined" || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.validateEmail) === true) {
// validate the email address
if (!validateEmails(mail.split(","))) return; // if cc, bcc are not valid cc, bcc = ""
if (cc && !validateEmails(cc.split(","))) cc = "";
if (bcc && !validateEmails(bcc.split(","))) bcc = "";
} // the title of the modal (email address)
if (cc && !validateEmails(cc.split(","))) cc = "";
if (bcc && !validateEmails(bcc.split(","))) bcc = ""; // the title of the modal (email address)
title.innerHTML = mail.split(",").join("<br/>"); // add the details if provided

File diff suppressed because one or more lines are too long