diff options
Diffstat (limited to 'it_mail.class')
-rw-r--r-- | it_mail.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_mail.class b/it_mail.class index 2c8b89e..f5a4f6f 100644 --- a/it_mail.class +++ b/it_mail.class @@ -316,7 +316,7 @@ function send() */ function header_escape($string) { - return preg_replace('/[\x80-\xff]/e', "sprintf('=?iso-8859-1?Q?=%02X?=', ord('\\0'))", $string); + return preg_match('/[\x00-\x1f\x80-\xff]/', $string) ? ("=?iso-8859-1?Q?" . preg_replace('/[\0x00-\x1f\x80-\xff]/e', "sprintf('=%02X', ord('\\0'))", $string) . "?=") : $string; } /** |