From: x2003bruneau Date: Tue, 11 Jul 2006 18:26:07 +0000 (+0000) Subject: Accept quoted charset names (charset="mycharset" instead of charset=mycharset) X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=bc5992997532cc82147266baba7e464bd35d8096;p=banana.git Accept quoted charset names (charset="mycharset" instead of charset=mycharset) Compatible with m$ Entourage git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@79 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/post.inc.php b/banana/post.inc.php index 8262285..09c2a0a 100644 --- a/banana/post.inc.php +++ b/banana/post.inc.php @@ -196,7 +196,7 @@ class BananaPost */ function _fix_charset() { - if (preg_match('!charset=([^;]*)\s*(;|$)!', $this->headers['content-type'], $matches)) { + if (preg_match('!charset="?([^;"]*)"?\s*(;|$)?!', $this->headers['content-type'], $matches)) { $body = iconv($matches[1], 'utf-8', $this->body); if (strlen($body) == 0) { return false;