Skip to content

Commit

Permalink
fix(message-generation): Escape single quote in address names
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Mar 8, 2024
1 parent 88474d6 commit 4ae5fad
Show file tree
Hide file tree
Showing 4 changed files with 349 additions and 336 deletions.
2 changes: 1 addition & 1 deletion lib/mime-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ class MimeNode {
* @returns {String} Mime word encoded string if needed
*/
_encodeAddressName(name) {
if (!/^[\w ']*$/.test(name)) {
if (!/^[\w ]*$/.test(name)) {
if (/^[\x20-\x7e]*$/.test(name)) {
return '"' + name.replace(/([\\"])/g, '\\$1') + '"';
} else {
Expand Down

0 comments on commit 4ae5fad

Please sign in to comment.