Fix xface handling in case it contains =?(B|Q)?...?=
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Thu, 13 Jul 2006 07:50:20 +0000 (07:50 +0000)
committerx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Thu, 13 Jul 2006 07:50:20 +0000 (07:50 +0000)
xface transfer encoding is now handled by makeLink

git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@90 9869982d-c50d-0410-be91-f2a2ec7c7c7b

Changelog
banana/misc.inc.php

index d33bb9c..07f3746 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,9 @@
+Thu, 13 Jul 2006                    Florent Bruneau <florent.bruneau@m4x.org>
+       * Bugfix: xfaces handling
+       
 Wed, 12 Jul 2006                    Florent Bruneau <florent.bruneau@m4x.org>
        * Add the list of subscriptions after the spool
+       * Make article view more user-friendly
 
 Tue, 11 Jul 2006                    Florent Bruneau <florent.bruneau@m4x.org>
        * Bugfix: body conversion from unknown charset
index 8991d58..269f2d0 100644 (file)
@@ -64,7 +64,7 @@ function makeLink($params)
 
     if (isset($params['xface'])) {
         $file = dirname($file) . '/xface.php';
-        $get  = 'face=' . $params['xface'];
+        $get  = 'face=' . urlencode($params['xface']);
     } else if (count($params) != 0) {
         $get = '?';
         foreach ($params as $key=>$value) {
@@ -308,10 +308,14 @@ function formatDisplayHeader($_header,$_text) {
             return $rsl;
 
         case "x-face":
-            return '<img src="' . makeLink(Array('xface' => urlencode(base64_encode($_text)))) .'"  alt="x-face" />';
+            return '<img src="' . makeLink(Array('xface' => base64_encode(headerDecode($_text)))) .'"  alt="x-face" />';
     
         case "subject":
-            return formatPlainText($_text);
+            $link = null;
+            if (function_exists('hook_getSubject')) {
+                $link = hook_getSubject($_text);
+            }
+            return formatPlainText($_text) . $link;
 
         default:
             return htmlentities($_text);