]> git.pld-linux.org Git - packages/dokuwiki.git/commitdiff
- discard spaces in email header. another fix for evolution, which apparently follows...
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 25 Feb 2008 14:58:02 +0000 (14:58 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-mail-headerencodequotes.patch -> 1.2

dokuwiki-mail-headerencodequotes.patch

index 0eecb66f946dffea6a24b1296799c7e5db010ae0..58f99d02e7c6fb64b782be00b8a914d3f5fc7721 100644 (file)
@@ -1,16 +1,20 @@
---- dokuwiki/inc/mail.php~     2008-02-25 16:32:34.000000000 +0200
-+++ dokuwiki/inc/mail.php      2008-02-25 16:32:58.878702838 +0200
-@@ -124,7 +125,12 @@
+--- dokuwiki/inc/mail.php~     2008-02-25 16:51:02.000000000 +0200
++++ dokuwiki/inc/mail.php      2008-02-25 16:51:07.741031127 +0200
+@@ -124,7 +125,16 @@
        }
  
        if(!utf8_isASCII($text)){
 -        $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text,0).'?=';
 +        // put the quotes outside as in =?UTF-8?Q?"Elan Ruusam=C3=A4e"?= vs "=?UTF-8?Q?Elan Ruusam=C3=A4e?="
 +        if (preg_match('/^"(.+)"$/', $text, $matches)) {
-+          $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1],0).'?="';
++          $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1], 0).'?="';
 +        } else {
-+          $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text,0).'?=';
++          $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?=';
 +        }
++        // additionally the space character should be encoded as =20 (or each
++        // word QP encoded separately).
++        // however this is needed only in mail headers, not globally in mail_quotedprintable_encode().
++        $text = str_replace(" ", "=20", $text);
        }
      }else{
        $text = '';
This page took 0.042449 seconds and 4 git commands to generate.