Bug #10489: quoted_printable_decode() & imap_qprint() decodes control codes.
| From: | slaygon at NOSPAMcensor dot net | Date: | Wed, 25 Apr 2001 13:51:13 +0000 |
| Subject: | Bug #10489: quoted_printable_decode() & imap_qprint() decodes control codes. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52378@lists.php.net to get a copy of this message | ||
From: slaygon@NOSPAMcensor.net
Operating system: Linux 2.4.3
PHP version: 4.0.4pl1
PHP Bug Type: *Mail Related
Bug description: quoted_printable_decode() & imap_qprint() decodes control codes.
quoted_printable_decode() and imap_qprint() decodes control codes aswell. This, I assume, is not
supposed to happen.
Also, these functions happily translate anything with two characters after the = sign (like =EV in
=EVIL), which they shouldn't.
Example:
$foo="This is =00=01 =E4 \"=20\" =21 =ev =FE string.";
echo "Quoting string \"".$foo."\"\n";
echo "quoted_printable_decode:
\"".quoted_printable_decode($foo)."\"\n";
echo "preg_replace:
\"".preg_replace("/\=([2-9A-Fa-f])([0-9A-Fa-f])/e",
"''.chr(hexdec('\\1\\2')).''", $foo)."\"\n";
Would result in:
Quoting string "This is =00=01 =E4 =2B "=20" =21 =ev =FE string."
quoted_printable_decode: "This is ä + " " ! ï þ string."
preg_replace: "This is =00=01 ä + " " ! =ev þ string."
Am I wrong in assuming that quoted_printable_decode() and imap_qprint() should act as my
preg_replace line above does?
--
Edit Bug report at: http://bugs.php.net/?id=10489&edit=1