Re: [evolution-patches] [Fwd: [composer, mailer] #59490 Signature is prefixed with '> " in replies]



yay, looking now at that sent mail I saw what I didn't spot before. the html mail part ends with =00, which explain the middle \0. so there's no need for further fixing I guess.

R.


On Tue, 2004-07-20 at 13:10 +0200, Radek Doulík wrote:
On Tue, 2004-07-20 at 18:37 +0800, Not Zed wrote:
On Tue, 2004-07-20 at 12:15 +0200, Radek Doulík wrote:
On Tue, 2004-07-20 at 18:02 +0800, Not Zed wrote:

I dont think you want to do this, this will stuff up the 'is the message changed' state.
it doesn't leave the changed flag up (it's cleared later). it also speeds up the composer start as you don't have to dup whole message content. so I think it's better to do it that way.

That really wont make it any slower.

But sure if it doesn't mess up undo, sure.  e.g. if you reply/hit new and hit close and it closes with no question.
yup, tested it and it works OK.

The embedded NUL character issue should be trivial to fix.
well, I tried to find the place, but I was soon lost in the all the formatting stuff.

So how exactly does this code make any difference?

The old code does strlen() on the content, the same as the new code.  It thus can't possibly include any embedded NUL, should one even exist in the string passed in.  Unless its that code being removed which added the NUL.
the difference is that it 1st sets the body text (before it set body text concatenated with signature text) and then it calls e_msg_composer_show_sig_file which sets the signature independently.

before it set the concatenated content which looked like this:

<blockquote type="cite">body text la la la end of text<br>signature

note the missing </blockquote> there. it's lost in the process of formatting. it's because the text variable passed to set_editor_text is sometime string looking like this:

<blockquote type="cite">body text la la la end of text\0</blockquote>

the middle \0 comes from that:
The problem is that when mailer formats the text/html part, it adds \0 at the end of stream. em-format-quote.c:emqf_format_message then adds </blocquote>...., but it's placed after the \0 from formatter. It doesn't bite us there anymore, but might be good idea to fix it anyway.
I wasn't able to find where is that \0 added. I hope you might be able to spot it easier and fix that part as well.

I am attaching the test case mail, which demonstrates this. If I created new HTML mail in evo and replied to it, it didn't reproduce the bug.

R.
--
Radek Doulík <rodo novell com>
Novell, Inc.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]