URL:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14713>
Summary: qprint.pl should be able to handle a soft line
break at the end of the string
Project: MHonArc
Submitted by: tesaen
Submitted on: Wed 10/05/05 at 08:24
Category: Mail Parsing
Severity: 3 - Normal
Item Group: Undesired Behavior
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Platform Version: All
Perl Version: 5.8.6
Component Version: 2.6.15
Fixed Release:
_______________________________________________________
Details:
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
}
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14713>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV