summaryrefslogtreecommitdiff
path: root/inc/mail.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2013-11-02 13:10:14 +0000
committerAnika Henke <anika@selfthinker.org>2013-11-02 13:10:14 +0000
commitc5393ecb1aa570830d21e9dc95b4c21cd9aa9c01 (patch)
tree96e8dc34468a325596a5f94c85e38374fbc4b9ba /inc/mail.php
parent71c1143e8785954ea00a62aeb755ca7d8fa47e56 (diff)
parent38d74b12176722ce52dc1905c13816a78a2551ee (diff)
downloadrpg-c5393ecb1aa570830d21e9dc95b4c21cd9aa9c01.tar.gz
rpg-c5393ecb1aa570830d21e9dc95b4c21cd9aa9c01.tar.bz2
Merge remote-tracking branch 'origin/master' into video-audio
Conflicts: inc/parser/xhtml.php
Diffstat (limited to 'inc/mail.php')
-rw-r--r--inc/mail.php8
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] ) ) ;
+}