summaryrefslogtreecommitdiff
path: root/program/lib/Mail/mimePart.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-03-09 07:43:19 +0000
committeralecpl <alec@alec.pl>2012-03-09 07:43:19 +0000
commitfe3a1d60a53920029932287629ee0afd4df729aa (patch)
treedc078998049bbd5dfdf5ab56908c4493e50fc147 /program/lib/Mail/mimePart.php
parenta1f855e0e60be3384a4446eedc9b2d52d9f41f49 (diff)
- Fix encoding of attachment with comma in name (#1488389)
Diffstat (limited to 'program/lib/Mail/mimePart.php')
-rw-r--r--program/lib/Mail/mimePart.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/Mail/mimePart.php b/program/lib/Mail/mimePart.php
index 036ce74a2..a1cf111de 100644
--- a/program/lib/Mail/mimePart.php
+++ b/program/lib/Mail/mimePart.php
@@ -639,8 +639,8 @@ class Mail_mimePart
// RFC 2045:
// value needs encoding if contains non-ASCII chars or is longer than 78 chars
if (!preg_match('#[^\x20-\x7E]#', $value)) {
- $token_regexp = '#([^\x21,\x23-\x27,\x2A,\x2B,\x2D'
- . ',\x2E,\x30-\x39,\x41-\x5A,\x5E-\x7E])#';
+ $token_regexp = '#([^\x21\x23-\x27\x2A\x2B\x2D'
+ . '\x2E\x30-\x39\x41-\x5A\x5E-\x7E])#';
if (!preg_match($token_regexp, $value)) {
// token
if (strlen($name) + strlen($value) + 3 <= $maxLength) {
@@ -662,7 +662,7 @@ class Mail_mimePart
// RFC2231:
$encValue = preg_replace_callback(
- '/([^\x21,\x23,\x24,\x26,\x2B,\x2D,\x2E,\x30-\x39,\x41-\x5A,\x5E-\x7E])/',
+ '/([^\x21\x23\x24\x26\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E])/',
array($this, '_encodeReplaceCallback'), $value
);
$value = "$charset'$language'$encValue";