svn: /web/php-news/trunk/ common.inc
| From: | Philip Olson | Date: | Thu, 17 Jun 2010 05:30:32 +0000 |
| Subject: | svn: /web/php-news/trunk/ common.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-8379@lists.php.net to get a copy of this message | ||
philip Thu, 17 Jun 2010 05:30:32 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300508
Log:
gwynne once suggested this (deal with truncated string) as an encoding fix, so let's test it.
Changed paths:
U web/php-news/trunk/common.inc
Modified: web/php-news/trunk/common.inc
===================================================================
--- web/php-news/trunk/common.inc 2010-06-17 01:54:13 UTC (rev 300507)
+++ web/php-news/trunk/common.inc 2010-06-17 05:30:32 UTC (rev 300508)
@@ -99,7 +99,7 @@
if (strpos($header, "=?") === false) {
return to_utf8($header, $basecharset);
}
- return preg_replace("/=\\?(.+?)\\?([qb])\\?(.+?)\\?=/ie",
"decode_header('\\1','\\2','\\3')", $header);
+ return preg_replace("/=\\?(.+?)\\?([qb])\\?(.+?)(\\?=|$)/ie",
"decode_header('\\1','\\2','\\3')", $header);
}
/* Email spam protection (taken from php-bugs-web) */