Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
expanded: expanded
});
} else {
out.url.push({
match: word
});
}
words[x] = '<a href="' + address + '" class="' + cn.auto + ' ' + cn.url + '">' + address + '</a>';
}
} else if (word.indexOf('@') > 0 && word.indexOf('.') > 0) {
// check email is valid
var email = addrs.parseOneAddress(word);
if (email) {
delete email.parts;
delete email.name;
if (!out.email) {
out.email = [];
}
out.email.push(email);
words[x] = '<a href="mailto:' + email.address + '" class="' + cn.auto + ' ' + cn.email + '">' + word + '</a>';
}
} else if (word.indexOf('@') === 0) {
if (!out.account) {
out.account = [];
}
out.account.push({