6.0.0-git
2019-03-18

[#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 2006-09-21 (4561 days ago)
Due 11/30/1999 (7048 days ago)
Updated 2007-02-05 (4424 days ago)
Assigned 2006-11-05 (4516 days ago)
Resolved 2007-02-05 (4424 days ago)
Milestone
Patch No

History
2007-02-05 02:09:33 Chuck Hagenbuch Due ⇒ 1999-11-30
 
2007-02-05 02:09:12 Chuck Hagenbuch Comment #10
State ⇒ Rejected
Due ⇒ 2000-06-30
Reply to this comment
Actually I can't get bad newlines at all now with HEAD, even using the 
attached .eml file.
2006-11-16 05:50:07 Chuck Hagenbuch Comment #9
Taken from Michael Slusarz
Due ⇒ 2006-07-31
Reply to this comment
Adding an IMP 5 milestone.
2006-11-16 05:49:33 Chuck Hagenbuch Version ⇒ HEAD
 
2006-11-16 05:48:57 Chuck Hagenbuch Type ⇒ Enhancement
State ⇒ Accepted
Priority ⇒ 1. Low
 
2006-11-05 14:39:59 Jan Schneider State ⇒ Assigned
Due ⇒ 2006-08-31
 
2006-10-04 17:28:06 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.
2006-10-04 05:41:59 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.
2006-10-04 05:21:47 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?
2006-10-02 16:48:19 scalero (at) datadec-online (dot) com Comment #5
New Attachment: Testfile.txt Download
Reply to this comment
The downloaded test file.
2006-10-02 16:47:07 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.
2006-10-01 00:11:24 Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
You need to provide example files.
2006-09-28 15:59:16 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.
2006-09-21 19:29:02 Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
2006-09-21 16:38:22 scalero (at) ddol (dot) es Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Download text attachments have the line breaks broken
Due ⇒ 2006-09-21
Queue ⇒ IMP
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