Changeset - r9:92edb84b78e1
[Not reviewed]
v0.4 default
0 1 0
Wolfgang Scherer (ws) - 13 years ago 2012-03-30 18:40:19
wolfgang.scherer@gmx.de
lib/util.php: poor man's quoted_printable_encode messes up $SUBJECT.
That's what you get for using cut 'n paste blocks and PHP in the first place :).
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
lib/util.php
Show inline comments
 
@@ -260,12 +260,13 @@ if (!function_exists("quoted_printable_e
 
         * this works, but replaces more characters than the minimum set. For readability
 
         * the spaces and CRLF pairs aren't encoded though.
 
         */
 
        function quoted_printable_encode($string) {
 
            $string = str_replace(array('%20', '%0D%0A', '%'), array(' ', "\r\n", '='), rawurlencode($string));
 
            $string = preg_replace('/[^\r\n]{73}[^=\r\n]{2}/', "$0=\r\n", $string);
 
            $string = preg_replace('/=24SUBJECT/', '$SUBJECT', $string);
 
            return $string;
 
        }
 
    }
 
}
 

	
 
// there should be no need ... quoted_printable_decode is around since PHP4
0 comments (0 inline, 0 general)