Merged in feature/314-dev-dev01 (pull request #24)

auto-patch  314-dev-dev01-2024-01-25T04_09_02

* auto-patch  314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
Tony Volpe
2024-01-25 04:11:47 +00:00
parent 6b67473553
commit 68dbe860e9
540 changed files with 3445 additions and 2131 deletions

View File

@@ -92,10 +92,7 @@ class Mailer extends MailerAbstract {
}
$headers = isset( $this->body['Headers'] ) ? (array) $this->body['Headers'] : [];
if ( $name !== 'Message-ID' ) {
$value = WP::sanitize_value( $value );
}
$value = $this->sanitize_header_value( $name, $value );
// Prevent duplicates.
$key = array_search( $name, array_column( $headers, 'Name' ), true );
@@ -466,4 +463,21 @@ class Mailer extends MailerAbstract {
return false;
}
/**
* Sanitize email header values.
*
* @param string $name Name of the header.
* @param string $value Value of the header.
*
* @since 3.11.1
*/
public function sanitize_header_value( $name, $value ) {
if ( strtolower( $name ) === 'message-id' ) {
return $value;
}
return parent::sanitize_header_value( $name, $value );
}
}