summaryrefslogtreecommitdiff
path: root/it_mail.class
diff options
context:
space:
mode:
authorChristian Schneider2008-09-10 17:04:56 +0000
committerChristian Schneider2008-09-10 17:04:56 +0000
commitf8163b71e69f38c3626b40be8028710ede686f14 (patch)
tree1d9830d39e5817ee3681f33d7684a0f8d803a4e0 /it_mail.class
parent5ea27d5ff3f26475d766635e650c0cd0fd163cf3 (diff)
downloaditools-f8163b71e69f38c3626b40be8028710ede686f14.tar.gz
itools-f8163b71e69f38c3626b40be8028710ede686f14.tar.bz2
itools-f8163b71e69f38c3626b40be8028710ede686f14.zip
Use one single encoding instead of one per character
Diffstat (limited to 'it_mail.class')
-rw-r--r--it_mail.class2
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;
}
/**