andris9/mailcomposer — pull request #39 by DevelopmentIL (2014-04-29 12:19:40+00:00)
Title: fix _encodeMimeWord special symbols on address name

This fix will support special symbols on address names.

Code tested via: http://dogmamix.com/MimeHeadersDecoder/

Code:
```
var str = mimelib.encodeMimeWords('שלום ע-ולם!,+fjAJD<>:;.\'/()[]"', 'Q'),

encodedStr = str.replace(/[^\w\?!*=+-]/g, function(chr){
var code = chr.charCodeAt(0);
return "=" + (code<0x10?"0":"") + code.toString(16).toUpperCase();
});

console.log(encodedStr);
```

Will output the valid encoded word:
```
=?UTF-8?Q?=D7=A9=D7=9C=D7=95=D7=9D_=D7=A2-=D7=95=D7=9C=D7=9D!=2C+fjAJD=3C=3E=3A=3B=2E=27=2F=28=29=5B=5D=22?=
```