Closed Bug 222892 Opened 21 years ago Closed 12 years ago

Mail attachments interfere with each other (css of unclosed anchor tag of HTML attachment leaks into entire message preview)

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 31052

People

(Reporter: James, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031010 Mozilla Firebird/0.6.1
Build Identifier: Mozilla Thunderbird 0.3 (20031014)

I created an email and it included an attached text/html file and some others of
type image/pdf.  I had made a mistake in my html - I forgot to close a anchor
tag - and this anchor set some hover effects using CSS2.  The result of
forgetting to close this tag, even though I closed the <body> and <html>
elements, was that the images in the inline attachment display had the CSS2
effects applied to them.

I assume this is because Thunderbird uses some incorrect and possibly dangerous
multiple-document-to-one-html-file translation to generate something to pass to
Gecko for rendering to the preview pane.

I understand how it might be hard to fix this so perhaps a good interim solution
would be to make the default option to View -> Message Body As -> Simple HTML. 
This view mode did not display incorrectly as far as I can tell.

Reproducible: Always

Steps to Reproduce:
1. View an email with the described html defects in the first attachement
<text/html> and images in the other attachments <e.g. text/png>.
2. Set View -> Display Attachments Inline on.
2. Set View -> Message Body As to Original HTML.

Actual Results:  
The images had the :hover stylesheet effects applied as defined in the first
attachment.

Expected Results:  
The CSS2 stylesheet speficiations affected onle the attachment in which they are
defined.

I could probably arrange for a sample email that exhibits this behaviour to be
sent if this description is unclear.
QA Contact: front-end
This should be fixed with bug 341059 or a similar solution to separate the styles between attachments. Setting the default to Simple HTML is IMHO not the best way to go, even though it might serve as a workaround.
Assignee: mscott → nobody
(In reply to rsx11m from comment #1)
> This should be fixed with bug 341059 or a similar solution to separate the
> styles between attachments.

Yes, bug 341059 or bug 82280 look like solutions for this bug, and it's another interesting instance of the underlying problem whose occurences are currently collected in bug 31052, of which this is a dupe.

> Setting the default to Simple HTML is IMHO not
> the best way to go, even though it might serve as a workaround.

Simple HTML can break the entire layout of all parts (CSS layout), so imo that's not even a workaround at all.
Per comment 2.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Summary: Mail attachments interfere with each other. → Mail attachments interfere with each other (css of unclosed anchor tag of HTML attachment leaks into entire message preview)
You need to log in before you can comment on or make changes to this bug.