From a0b774a3d90122733a81a40622e23e21c44aed41 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Tue, 11 Jul 2006 18:26:07 +0000 Subject: [PATCH] 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 --- banana/post.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.1.4