6.0.0-RC7
6/27/26

[#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 9/21/06 (7219 days ago)
Due 11/30/99 (9706 days ago)
Updated 2/5/07 (7082 days ago)
Assigned 11/5/06 (7174 days ago)
Resolved 2/5/07 (7082 days ago)
Milestone
Patch No

History
332 Chuck Hagenbuch Due ⇒ 11/30/99
 
122 Chuck Hagenbuch Comment #10
State ⇒ Rejected
Due ⇒ 6/30/00
Reply to this comment
Actually I can't get bad newlines at all now with HEAD, even using the 
attached .eml file.
75 Chuck Hagenbuch Comment #9
Taken from Michael Slusarz
Due ⇒ 7/31/06
Reply to this comment
Adding an IMP 5 milestone.
335 Chuck Hagenbuch Version ⇒ HEAD
 
575 Chuck Hagenbuch Type ⇒ Enhancement
State ⇒ Accepted
Priority ⇒ 1. Low
 
592 Jan Schneider State ⇒ Assigned
Due ⇒ 8/31/06
 
65 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.
595 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.
475 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?
194 scalero (at) datadec-online (dot) com Comment #5
New Attachment: Testfile.txt Download
Reply to this comment
The downloaded test file.
74 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.
2412 Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
You need to provide example files.
163 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.
27 Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
224 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 ⇒ 9/21/06
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