File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ module.exports.mimeFunctions = {
308
308
309
309
var fromCharset , encoding , match ;
310
310
311
- match = str . match ( / ^ \= \? ( [ \w _ \- ] + ) \? ( [ Q q B b ] ) \? ( [ ^ \? ] + ) \? \= $ / i) ;
311
+ match = str . match ( / ^ \= \? ( [ \w _ \- ] + ) \? ( [ Q q B b ] ) \? ( [ ^ \? ] * ) \? \= $ / i) ;
312
312
if ( ! match ) {
313
313
return convert ( str , toCharset ) ;
314
314
}
@@ -332,8 +332,8 @@ module.exports.mimeFunctions = {
332
332
var curCharset ;
333
333
334
334
str = ( str || "" ) . toString ( ) .
335
- replace ( / ( = \? [ ^ ? ] + \? [ Q q B b ] \? [ ^ ? ] + \? = ) \s + (? = = \? [ ^ ? ] + \? [ Q q B b ] \? [ ^ ? ] + \? = ) / g, "$1" ) .
336
- replace ( / \= \? ( [ \w _ \- ] + ) \? ( [ Q q B b ] ) \? [ ^ \? ] + \? \= / g, ( function ( mimeWord , charset , encoding ) {
335
+ replace ( / ( = \? [ ^ ? ] + \? [ Q q B b ] \? [ ^ ? ] + \? = ) \s + (? = = \? [ ^ ? ] + \? [ Q q B b ] \? [ ^ ? ] * \? = ) / g, "$1" ) .
336
+ replace ( / \= \? ( [ \w _ \- ] + ) \? ( [ Q q B b ] ) \? [ ^ \? ] * \? \= / g, ( function ( mimeWord , charset , encoding ) {
337
337
curCharset = charset + encoding ;
338
338
return this . decodeMimeWord ( mimeWord ) ;
339
339
} ) . bind ( this ) ) ;
@@ -581,4 +581,4 @@ function checkRanges(nr, ranges) {
581
581
}
582
582
}
583
583
return false ;
584
- }
584
+ }
You can’t perform that action at this time.
0 commit comments