=?utf-8?q?Fix=20xface=20handling=20in=20case=20it=20contains=20=3D=3F(B|Q)=3F......
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Thu, 13 Jul 2006 07:50:20 +0000 (07:50 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:34:55 +0000 (00:34 +0100)
=20xface=20transfer=20encoding=20is=20now=20handled=20by=20makeLink?=

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);