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

Submitted by:  Ryan <tesaen>
Submitted on:  Wed 05 Oct 2005 08:24:08 AM UTC  
 
Category: Mail ParsingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Undesired Behavior
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Operating System: AllPerl Version: 5.8.6
Component Version: 2.6.15Fixed 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 10 Jun 2006 02:53:33 AM UTCehoodStatusReady For Test=>Fixed
  Open/ClosedOpen=>Closed
  Fixed ReleaseCVS=>2.6.16
Tue 20 Dec 2005 08:29:03 PM UTCehoodStatusNone=>Ready For Test
  Fixed Release=>CVS

Back to the top


Powered by Savane 3.1-cleanup1