diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:08:45 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:08:45 -0500 |
commit | 43db6faf2afe9075d97c59bfc80fb0fd27488606 (patch) | |
tree | 6388a5d22bd81d640f33c446d78ddcb0b3375507 /mailnews/mime/src/mimeJSComponents.js | |
parent | 0707a51eaddec22ab760e27050e2fcefab2cdae5 (diff) | |
download | UXP-43db6faf2afe9075d97c59bfc80fb0fd27488606.tar UXP-43db6faf2afe9075d97c59bfc80fb0fd27488606.tar.gz UXP-43db6faf2afe9075d97c59bfc80fb0fd27488606.tar.lz UXP-43db6faf2afe9075d97c59bfc80fb0fd27488606.tar.xz UXP-43db6faf2afe9075d97c59bfc80fb0fd27488606.zip |
Bug 1528496 - Correctly fix Bug 1023285 and utf8 addressing header display for jsmime.
Tag #1273
Diffstat (limited to 'mailnews/mime/src/mimeJSComponents.js')
-rw-r--r-- | mailnews/mime/src/mimeJSComponents.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mailnews/mime/src/mimeJSComponents.js b/mailnews/mime/src/mimeJSComponents.js index 5ba7ff084..8e9d0684a 100644 --- a/mailnews/mime/src/mimeJSComponents.js +++ b/mailnews/mime/src/mimeJSComponents.js @@ -269,6 +269,15 @@ MimeAddressParser.prototype = { MimeParser.HEADER_ADDRESS | MimeParser.HEADER_OPTION_ALL_I18N, aCharset); return fixArray(value, aPreserveGroups, count); }, + parseEncodedHeaderW: function (aHeader, count) { + aHeader = aHeader || ""; + let value = MimeParser.parseHeaderField(aHeader, + MimeParser.HEADER_ADDRESS | + MimeParser.HEADER_OPTION_DECODE_2231 | + MimeParser.HEADER_OPTION_DECODE_2047, + undefined); + return fixArray(value, false, count); + }, parseDecodedHeader: function (aHeader, aPreserveGroups, count) { aHeader = aHeader || ""; let value = MimeParser.parseHeaderField(aHeader, MimeParser.HEADER_ADDRESS); @@ -390,13 +399,7 @@ MimeAddressParser.prototype = { parseHeadersWithArray: function (aHeader, aAddrs, aNames, aFullNames) { let addrs = [], names = [], fullNames = []; - // Parse header, but without HEADER_OPTION_ALLOW_RAW. - let value = MimeParser.parseHeaderField(aHeader || "", - MimeParser.HEADER_ADDRESS | - MimeParser.HEADER_OPTION_DECODE_2231 | - MimeParser.HEADER_OPTION_DECODE_2047, - undefined); - let allAddresses = fixArray(value, false); + let allAddresses = this.parseEncodedHeader(aHeader, undefined, false); // Don't index the dummy empty address. if (aHeader.trim() == "") |