Closed Bug 228720 Opened 21 years ago Closed 21 years ago

Don't down-convert message to plain text if dir attribute is set


(Core :: Layout: Text and Fonts, defect)

Not set





(Reporter: bugzillamozilla, Assigned: mscott)


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031212
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031212

Mozilla Format Auto-Detection wrongly converts HTML email with dir="rtl" to
plain text. This results in a left-aligned, LTR message - a serious problem for
Hebrew and Arabic users.

Reproducible: Always

Steps to Reproduce:
1. Launch Mozilla Mail&News and press Compose.
2. Change the body direction to of the mail to RTL.
3. Type some Hebrew or Arabic characters followed by a full stop.
4. Send the mail.

* To change the body to RTL, focus the caret on the body of the mail -> Format
menu -> Page colors and Backgournd -> Advanced Edit -> Attribute Dir=rtl -> OK -> OK

Actual Results:  
The mail is converted to plain text, losing the direction attribute. The
recipient sees an LTR message, with the full stop at the wrong side (rightmost)
and wrong word order if some LTR words are included.

-> Content-Type: text/plain; charset=windows-1255; format=flowed

Expected Results:  
The mail should remain HTML (preferably, multipart HTML+plain text) in order to
retain the direction. 

If "strong" formatting elements are included the mail does get sent as text/html
(not multipart).

Can someone please confirm this bug and reassign it to Scott MacGregor
( He already provides a patch for this issue in the related
Bug 136502.


Assignee: mkaply → mscott
Ever confirmed: true
Patch checked in. r/sr=bienvenu. The patch was in 136502.
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.7alpha
Scott, how about asking approval1.6 for this fix? It definely fits my definition
of "high reward, low risk change".

Later today, I'm going to deploy a build of the current 1.6 branch to quite a
few testers. This build will include the patch for bug 162242, and it would be
great to also apply your patch for this bug. If no regressions are found, then
the fixes for both bugs would make 1.6 a huge release for BiDi users.

the build prog made can be found here:
this has been checked into the 1.6 branch
Flags: blocking1.6+
Product: MailNews → Core
Component: MailNews: BiDi Hebrew & Arabic → Layout: Text
QA Contact: giladehven → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.