Re: Process $body with decodeHeader()?
Takahiro Kambe <[email protected]> Tue, 29 Oct 2013 00:58:32 +0900 (JST)
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <[email protected]> |
In message <CAHog114WmSVjpuTw+2+pR2hLV=YEUt4kOP8wd+UY24b0eEub+w@mail.gmail.com> on Thu, 24 Oct 2013 16:45:32 -0700, Paul Lesniewski <[email protected]> wrote: > >> In src/compose.php, body of a message is passed to decodeHeader(). >> Why $body is passed to decodeHeader()? > > I'm not certain. Marc introduced it long, long ago: > > http://sourceforge.net/p/squirrelmail/code/4565/ Thanks for your pointer. > If you look at the code around there, a few things that aren't headers > (such as $signature) are being passed to decodeHeader() so it may have > been a safety mechanism to catch values of many different strings that > were possibly encoded. First, I guessed it was intended to handle forward (text in body) or cited message when replying. But I noticed later, the codes handle saved signature using MIME encoded format. >> 1. Accidently (or intentionally) body text contains encoded MIME >> header string such as "=?iso-2022-jp?B ...". > > I see. Although a quick test replying to a text/plain message in > quoted-printable encoding seems to show that the message is already > decoded by the time it gets here (thus it seems this decodeHeader() > call isn't needed to convert the QP blocks/entities), I'm hesitant to > touch this since there was presumably good reason for the change. If > you want to remove all the calls to decodeHeader($body...) (I see at > least three of them) and test for a while, your feedback would be > welcomed. I already tested a few case by removing decodeHeader() for body and it works fine. But we should consider what character encoding (or encoded string) are used in each part of codes... -- Takahiro Kambe / <[email protected]> ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk ----- squirrelmail-devel mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: [email protected] List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel