Closed Bug 495943 Opened 15 years ago Closed 15 years ago

Attachment reminder should not search quoted text in replies (plain-text case)

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: elbows, Assigned: mkmelin)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090519 Lightning/1.0pre Shredder/3.0b3pre

When send a reply to a message, the "Check for missing attachments" feature looks at your entire reply, including parts of the original message that you've quoted. Since the whole original message is quoted by default, you'll see the attachment reminder dialog if a keyword like "attachment" appears anywhere in the message -- even if you haven't actually typed such a keyword.

This could be avoid by ignoring text from the message you're replying to.



Reproducible: Always

Steps to Reproduce:
1. Receive a message containing the word "attachment"
2. Reply to it.
3. Send your reply.
4. The attachment reminder dialog pops up.
Actual Results:  
The reminder dialog always appears.

Expected Results:  
The reminder dialog should not appear unless the un-quoted portion of my reply contains a matching keyword.
Confirming per discussion in bug 492934 comment #3 since this is filed now.
Quotes are omitted from checking in HTML but not plain-text composition.
Some code from the spell checker may be helpful for guidance, it nicely
takes care of quote/non-quote also in plain-text messages.
Blocks: 244455
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Attachment reminder should not search quoted text in replies → Attachment reminder should not search quoted text in replies (plain-text case)
Version: unspecified → Trunk
Assignee: nobody → mkmelin+mozilla
Target Milestone: --- → Thunderbird 3.0b3
Attached patch proposed fix (obsolete) — Splinter Review
Attachment #382544 - Flags: review?(philringnalda)
Status: NEW → ASSIGNED
Fun fact: we actually have a pref that controls whether the quote is in a span or a pre (apparently we were nervous that bug 92331 would break something other than timeless hitting an assertion once in 2002).

Fun fact two: I've been led to believe that hasAttribute is way, way, way faster than getAttribute when you don't much care about the value. I really wish we had some sort of perf testing that would tell us how much it's costing us while sending something like a reply to a mailing list digest with a few thousand quote-spans to check that the value is the only value that we ever set on _moz_quote, just so that someone in the future could hypothetically be silly and set some other value.
Seems hasAttribute is about 20% faster
Attachment #382544 - Attachment is obsolete: true
Attachment #382544 - Flags: review?(philringnalda)
Attached patch proposed fix, v2Splinter Review
Use hasAttribute and look at the editor.quotesPreformatted too.
Attachment #382742 - Attachment is obsolete: true
Attachment #382746 - Flags: review?
Attachment #382746 - Flags: review? → review?(philringnalda)
Yes, please! Currently, I've seen that dialog about 20 times, perhaps one time in three I send an email, and it's been wrong every single time. I suspect a large part of the problem is that it's scanning quoted text.

Gerv
Attachment #382746 - Flags: review?(philringnalda) → review+
Comment on attachment 382746 [details] [diff] [review]
proposed fix, v2

Pretty!
changeset:   2962:bb94ed177f1f
http://hg.mozilla.org/comm-central/rev/bb94ed177f1f

->FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: