Fixes vim mode line.
[banana.git] / banana / mimepart.inc.php
index 032ae4d..d654ea5 100644 (file)
@@ -174,7 +174,7 @@ class BananaMimePart
             $disposition  = $this->getHeader('content-disposition', '/(inline|attachment)/i');
             $boundary     = $this->getHeader('content-type', '/boundary="?([^ "]+?)"?\s*(;|$)/i');
             $charset      = strtolower($this->getHeader('content-type', '/charset="?([^ "]+?)"?\s*(;|$)/i'));
-            $filename     = $this->getHeader('content-disposition', '/filename="?([^ "]+?)"?\s*(;|$)/i');
+            $filename     = $this->getHeader('content-disposition', '/filename="?([^"]+?)"?\s*(;|$)/i');
             $format       = strtolower($this->getHeader('content-type', '/format="?([^ "]+?)"?\s*(;|$)/i'));
             $id           = $this->getHeader('content-id', '/<(.*?)>/');
             $sign_protocole = strtolower($this->getHeader('content-type', '/protocol="?([^ "]+?)"?\s*(;|$)/i'));
@@ -485,11 +485,11 @@ class BananaMimePart
             if (!$part) {
                 $part = $this->content_type;
             }
-            return '[' . Banana::$page->makeImgLink(array('group' => Banana::$group,
+            return '<span>[' . Banana::$page->makeImgLink(array('group' => Banana::$group,
                                                  'artid' => Banana::$artid,
                                                  'part'  => $part,
                                                  'text'  => $this->filename ? $this->filename : $this->content_type,
-                                                 'img'   => 'save')) . ']';
+                                                 'img'   => 'save')) . ']</span>';
         } elseif ($type == 'multipart' && ($subtype == 'mixed' || $subtype == 'report')) {
             $text = '';
             foreach ($this->multipart as &$part) {
@@ -722,5 +722,5 @@ class BananaMimePart
     }
 }
 
-// vim:set et sw=4 sts=4 ts=4 enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 fenc=utf-8:
 ?>