mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-08-12 08:34:39 +07:00
node_modules: update
This commit is contained in:
24
node_modules/nodemailer/lib/addressparser/index.js
generated
vendored
24
node_modules/nodemailer/lib/addressparser/index.js
generated
vendored
@ -73,7 +73,7 @@ function _handleAddress(tokens) {
|
||||
}
|
||||
}
|
||||
|
||||
let _regexHandler = function(address) {
|
||||
let _regexHandler = function (address) {
|
||||
if (!data.address.length) {
|
||||
data.address = [address.trim()];
|
||||
return ' ';
|
||||
@ -195,9 +195,9 @@ class Tokenizer {
|
||||
* @param {String} chr Character from the address field
|
||||
*/
|
||||
checkChar(chr) {
|
||||
if ((chr in this.operators || chr === '\\') && this.escaped) {
|
||||
this.escaped = false;
|
||||
} else if (this.operatorExpecting && chr === this.operatorExpecting) {
|
||||
if (this.escaped) {
|
||||
// ignore next condition blocks
|
||||
} else if (chr === this.operatorExpecting) {
|
||||
this.node = {
|
||||
type: 'operator',
|
||||
value: chr
|
||||
@ -217,9 +217,7 @@ class Tokenizer {
|
||||
this.operatorExpecting = this.operators[chr];
|
||||
this.escaped = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.escaped && chr === '\\') {
|
||||
} else if (['"', "'"].includes(this.operatorExpecting) && chr === '\\') {
|
||||
this.escaped = true;
|
||||
return;
|
||||
}
|
||||
@ -232,11 +230,17 @@ class Tokenizer {
|
||||
this.list.push(this.node);
|
||||
}
|
||||
|
||||
if (this.escaped && chr !== '\\') {
|
||||
this.node.value += '\\';
|
||||
if (chr === '\n') {
|
||||
// Convert newlines to spaces. Carriage return is ignored as \r and \n usually
|
||||
// go together anyway and there already is a WS for \n. Lone \r means something is fishy.
|
||||
chr = ' ';
|
||||
}
|
||||
|
||||
if (chr.charCodeAt(0) >= 0x21 || [' ', '\t'].includes(chr)) {
|
||||
// skip command bytes
|
||||
this.node.value += chr;
|
||||
}
|
||||
|
||||
this.node.value += chr;
|
||||
this.escaped = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user