6.0.0-beta1
9/5/25

[#4444] Download text attachments have the line breaks broken
Summary Download text attachments have the line breaks broken
Queue IMP
Queue Version HEAD
Type Enhancement
State Rejected
Priority 1. Low
Owners
Requester scalero (at) ddol (dot) es
Created 09/21/2006 (6924 days ago)
Due 11/30/1999 (9411 days ago)
Updated 02/05/2007 (6787 days ago)
Assigned 11/05/2006 (6879 days ago)
Resolved 02/05/2007 (6787 days ago)
Milestone
Patch No

History
02/05/2007 02:09:33 AM Chuck Hagenbuch Due ⇒ 11/30/1999
 
02/05/2007 02:09:12 AM Chuck Hagenbuch Comment #10
State ⇒ Rejected
Due ⇒ 06/30/2000
Reply to this comment
Actually I can't get bad newlines at all now with HEAD, even using the 
attached .eml file.
11/16/2006 05:50:07 AM Chuck Hagenbuch Comment #9
Taken from Michael Slusarz
Due ⇒ 07/31/2006
Reply to this comment
Adding an IMP 5 milestone.
11/16/2006 05:49:33 AM Chuck Hagenbuch Version ⇒ HEAD
 
11/16/2006 05:48:57 AM Chuck Hagenbuch Type ⇒ Enhancement
State ⇒ Accepted
Priority ⇒ 1. Low
 
11/05/2006 02:39:59 PM Jan Schneider State ⇒ Assigned
Due ⇒ 08/31/2006
 
10/04/2006 05:28:06 PM Chuck Hagenbuch Comment #8 Reply to this comment
And that being said... (to other dev's): do we want to add code to
view.php that will automatically convert linebreak characters when
downloading, for text/* parts only, based on the OS obtained from the
remote browser?
That does seem reasonable to me.
10/04/2006 05:41:59 AM Michael Slusarz Comment #7 Reply to this comment
FWIW, thunderbird sends the message identical to imp so this 
reinforces that this is not an imp issue.
10/04/2006 05:21:47 AM Michael Slusarz Comment #6 Reply to this comment
Duplicate of 3565.  Essentially, when sending a message in text/plain 
format you lose the line break characters unless you specifically 
encode them.  And you don't encode these line break characters unless 
the browser specifically informs IMP we are dealing with binary data.



That being said, notepad is terrible and is probably the only editor 
out there that can not handle the different line breaks.



And that being said... (to other dev's): do we want to add code to 
view.php that will automatically convert linebreak characters when 
downloading, for text/* parts only, based on the OS obtained from the 
remote browser?
10/02/2006 04:48:19 PM scalero (at) datadec-online (dot) com Comment #5
New Attachment: Testfile.txt Download
Reply to this comment
The downloaded test file.
10/02/2006 04:47:07 PM scalero (at) datadec-online (dot) com Comment #4
New Attachment: Test of plaintext attached file.eml Download
Reply to this comment
I attach a message with a test plaintext file attached and the result 
of download this attached file.



Greetings.
10/01/2006 12:11:24 AM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
You need to provide example files.
09/28/2006 03:59:16 PM scalero (at) datadec-online (dot) com Comment #2 Reply to this comment
I see now that my last change shows OK the text(txt) files but brokens 
the PDF files.



Greetings.



Sebastián Calero.
09/21/2006 07:29:02 PM Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
09/21/2006 04:38:22 PM scalero (at) ddol (dot) es Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ Download text attachments have the line breaks broken
Type ⇒ Bug
Due ⇒ 09/21/2006
Reply to this comment
If I receive a text file, created with notepad, and I click the link 
'Download ...'  and save it to disk. When I double click the text file 
and is opened again with notepad the line breaks are broken. I think 
the original <CR><LF> is now <LF> only.



The follow change in the file 'horde/imp/view.php' solves this:



case 'download_attach':

case 'download_render':

     switch ($actionID) {

     case 'download_attach':

         /* Make sure we get the entire contents of the part. */

         $mime = $contents->getDecodedMIMEPart($id, true);

     --  $body = $mime->getContents();

     ++ $body = $mime->getCanonicalContents();

         $type = $mime->getType(true);

         break;



Can this change cause some problem?



Greetings.





Sebastián Calero.


Saved Queries