diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-19 21:26:50 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2013-11-19 21:26:50 +0100 |
commit | 703aeaef1a43b07dc5497dba72c98151466396cc (patch) | |
tree | 1e18a6b3fc3c28156c2e56f8a3d515b8dd6a9cf9 /inc/mail.php | |
parent | 33c3b3817b00aa9384760813643fac0e33daaaff (diff) | |
parent | 14b3007921f7b66fc9e3621b861a3c83e7e9093c (diff) | |
download | rpg-703aeaef1a43b07dc5497dba72c98151466396cc.tar.gz rpg-703aeaef1a43b07dc5497dba72c98151466396cc.tar.bz2 |
Merge remote-tracking branch 'origin/master' into diff_navigation
Diffstat (limited to 'inc/mail.php')
-rw-r--r-- | inc/mail.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/mail.php b/inc/mail.php index d0ea651bf..0b60c0a5b 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -284,10 +284,9 @@ function mail_quotedprintable_encode($sText,$maxlen=74,$bEmulate_imap_8bit=true) // for EBCDIC safeness encode !"#$@[\]^`{|}~, // for complete safeness encode every character :) if ($bEmulate_imap_8bit) - $sRegExp = '/[^\x20\x21-\x3C\x3E-\x7E]/e'; + $sRegExp = '/[^\x20\x21-\x3C\x3E-\x7E]/'; - $sReplmt = 'sprintf( "=%02X", ord ( "$0" ) ) ;'; - $sLine = preg_replace( $sRegExp, $sReplmt, $sLine ); + $sLine = preg_replace_callback( $sRegExp, 'mail_quotedprintable_encode_callback', $sLine ); // encode x09,x20 at lineends { @@ -330,3 +329,6 @@ function mail_quotedprintable_encode($sText,$maxlen=74,$bEmulate_imap_8bit=true) return implode(MAILHEADER_EOL,$aLines); } +function mail_quotedprintable_encode_callback($matches){ + return sprintf( "=%02X", ord ( $matches[0] ) ) ; +} |