bugMHonArc - Bugs: bug #14713, qprint.pl should be able to handle...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #14713: qprint.pl should be able to handle a soft line break at the end of the string

Submitter:  Ryan <tesaen>
Submitted:  Wed 05 Oct 2005 08:24:08 AM UTC
   
 
Category:  Mail Parsing Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Undesired Behavior
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  All Perl Version:  5.8.6
Component Version:  2.6.15 Fixed Release:  2.6.16

Wed 10 May 2006 08:02:22 PM UTC, comment #2: 

I agree that this should be addressed by Apple's Mail. I've already filed a bug report against them, so hopefully it'll get fixed in a software update or in Leopard...

Ryan <tesaen>
Tue 20 Dec 2005 08:29:03 PM UTC, comment #1: 

Checked in a variant fix into CVS that should correct the problem,
but be more efficient since the regex or operation is avoided.

Note, I believe Apple's Mail is creating invalid input.
I'm not sure about the "correctness" of blindly dropping a
'=' that is not followed by a linebreak sequence, but hopefully,
the fix should not adversely affect anything.

Earl Hood <ehood>
Group administrator
Wed 05 Oct 2005 08:24:08 AM UTC, original submission:  

Apple's Mail.app encodes text/html MIME parts with a soft line break at the end of the MIME part:

--Apple-Mail-2--132721608
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=UTF-8

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">=C2=B4=C3=A9<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><FONT =
class=3D"Apple-style-span" color=3D"#333333" face=3D"Lucida Grande">=D9=86=
 =D8=B4=D9=8A=D8=AE<BR></FONT><DIV><DIV>On Oct 5, 2005, at 12:44 AM, =
Ryan Nielsen wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">balbasf<DIV><B>fjdskalf</B></DIV><DIV>jfksdlfjaklsl</DIV><DI=
V><I>fjkdsljfa</I></DIV><DIV><I><B>fduisfopsd</B></I></DIV><DIV>jfkds</DIV=

><DIV><BR =

class=3D"khtml-block-placeholder"></DIV><DIV>--</DIV><DIV>Ryan</DIV></BLOC=
KQUOTE></DIV><BR></DIV></BODY></HTML>=

--Apple-Mail-2--132721608--

qprint.pl doesn't remove this final '=' so it appears in archive files created from text/html quoted-printable messages. This diff makes things better (for me, in my test messages...):

--- /tmp/qprint.pl      2005-10-05 01:23:15.000000000 -0700
+++ /Volumes/Data/local/perl5/qprint.pl 2005-10-05 01:11:28.000000000 -0700
@@ -36,7 +36,7 @@
     local($_) = shift;
 
     s/[^\S\r\n]*(\r?\n)/$1/g;  # remove trailing whitespace on each line
-    s/\=\r?\n//g;              # remove soft linebreaks
+    s/\=(\r?\n|$)//g;          # remove soft linebreaks
     s/=([0-9A-Fa-f]{2})/pack('H2',$1)/ge;      # convert hex codes
     $_;                                # return result
 }

Ryan <tesaen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-06-10 ehood StatusReady For Test Fixed
    Open/ClosedOpen Closed
    Fixed ReleaseCVS 2.6.16
2005-12-20 ehood StatusNone Ready For Test
    Fixed Release CVS

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code