Skip to content

Commit

Permalink
Ensure QP encoding uses whatever LE is set to, fixes PHPMailer#170
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Jan 27, 2014
1 parent 01f4c43 commit cdbd5d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class.phpmailer.php
Expand Up @@ -2364,7 +2364,7 @@ public function base64EncodeWrapMB($str, $lf = null)
public function encodeQP($string, $line_max = 76)
{
if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3)
return quoted_printable_encode($string);
return $this->fixEOL(quoted_printable_encode($string));
}
//Fall back to a pure PHP implementation
$string = str_replace(
Expand All @@ -2373,7 +2373,7 @@ public function encodeQP($string, $line_max = 76)
rawurlencode($string)
);
$string = preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string);
return $string;
return $this->fixEOL($string);
}

/**
Expand Down

0 comments on commit cdbd5d8

Please sign in to comment.