[chora] text/plain driver unsuitable in most cases

Roman Neuhauser neuhauser@bellavista.cz
Mon, 22 Jul 2002 13:40:45 +0200


---------------------- multipart/mixed attachment
Hi there,

I have this problem with Chora: files w/o extensions end up being
displayed using the plain viewer, which sets content-type: text/html.
That results in lines being wrapped. This looks like a bug, because
Makefiles, TODO files, etc. are displayed with lines wrapped.
It looks like pulling the text through 
Text::toHTML(.., TEXT_HTML_NOHTML) fixes it, but i don't know if this is
the right fix. Use at your own risk.

-- 
FreeBSD 4.6-STABLE
1:24PM up 5 days, 23:43, 7 users, load averages: 0.02, 0.04, 0.01

---------------------- multipart/mixed attachment
Index: lib/MIME/Viewer/plain.php
===================================================================
RCS file: /repository/horde/lib/MIME/Viewer/plain.php,v
retrieving revision 1.1
diff -u -r1.1 plain.php
--- lib/MIME/Viewer/plain.php	8 Jul 2002 17:45:41 -0000	1.1
+++ lib/MIME/Viewer/plain.php	22 Jul 2002 11:37:17 -0000
@@ -21,8 +21,8 @@
     function render()
     {
         include_once HORDE_BASE . '/lib/Text.php';
-        return Text::enableCapitalLinks(Text::linkUrls($this->mime_part->getContents(),
-                                                       true));
+        return Text::toHTML(Text::enableCapitalLinks(Text::linkUrls($this->mime_part->getContents(),
+                                                                    true)), TEXT_HTML_NOHTML);
     }
 
     /**

---------------------- multipart/mixed attachment--