summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index b67350b..e8c9960 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1766,7 +1766,7 @@ function truncate_utf8($string, $len) {
* have to be changed to \r\n or \r.
*/
function mime_header_encode($string, $charset = 'UTF-8') {
- if (!preg_match('/^[\x20-\x7E]*$/', $string)) {
+ if (preg_match('/[^\x20-\x7E]/', $string)) {
$chunk_size = 75 - 7 - strlen($charset);
$chunk_size -= $chunk_size % 4;
$string = trim(chunk_split(base64_encode($string), $chunk_size, "\n"));