|
|
|
@ -838,7 +838,7 @@ function decodeWords(str, state) {
|
|
|
|
|
|
|
|
|
|
var bytes, m, i, j, leni, lenj, seq, replaces = [], lastReplace = {};
|
|
|
|
|
|
|
|
|
|
// join consecutive encoded words that have the same charset and encoding first
|
|
|
|
|
// join consecutive q-encoded words that have the same charset first
|
|
|
|
|
while (m = RE_ENCWORD.exec(str)) {
|
|
|
|
|
seq = {
|
|
|
|
|
consecutive: (pendoffset > -1
|
|
|
|
@ -854,7 +854,8 @@ function decodeWords(str, state) {
|
|
|
|
|
lastReplace = replaces.length && replaces[replaces.length - 1];
|
|
|
|
|
if (seq.consecutive
|
|
|
|
|
&& seq.charset === lastReplace.charset
|
|
|
|
|
&& seq.encoding === lastReplace.encoding) {
|
|
|
|
|
&& seq.encoding === lastReplace.encoding
|
|
|
|
|
&& seq.encoding === 'q') {
|
|
|
|
|
lastReplace.length += seq.length + seq.index - pendoffset;
|
|
|
|
|
lastReplace.chunk += seq.chunk;
|
|
|
|
|
} else {
|
|
|
|
|