All users were logged out of Bugzilla on October 13th, 2018

right-to-left unicode followed by <a> is incorrectly displayed.

RESOLVED INVALID

Status

()

RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: vpoythress1, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc4 Firefox/1.0.6

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD></HEAD><BODY LANG="en-US" DIR="LTR">
<p> This is a sample file that does not display correctly in firefox 1.0.6 or
Konqueror 3.4.2-0.fc4.1.
But it does behave in firefox with a few modifications.  Here is the part that
is problematic, because of right-to-left unicode:
</p>
<p>
ordinary, then <font face="SBL Hebrew">אִישׁ</font>.<a
  href="#sd"><sup>24</sup></a>, then ordinary.
</p>
<p>Now consider the same text with a slight modification:
</p>
<p>
ordinary, then <font face="SBL Hebrew">אִישׁ</font>.a<a
 href="#sd"><sup>24</sup></a>, then ordinary.
</p>
<p> Weird, isn't it?  Notice that in the first case, in firefox the writing
continues to be right-to-left even after the close of the unicode font.  In the
second case, the order is restored to left-to-right immediately (which is the
correct behavior).  In Konqueror, the behavior is incorrect in both instances.
</p>
<p>It makes no difference when I put the unicode in decimal form:
</p>
<p>
ordinary, then <font face="SBL Hebrew">&#1488;&#1460;&#1497;&#1513;&#1473;</font>.<a
  href="#sd"><sup>24</sup></a>, then ordinary.
</p>
<p>
ordinary, then <font face="SBL
Hebrew">&#1488;&#1460;&#1497;&#1513;&#1473;</font>.a<a
  href="#sd"><sup>24</sup></a>, then ordinary.
</p>
<p>The problem disappears when I remove the hyperlink:
</p>
<p>ordinary, then <font face="SBL Hebrew">אִישׁ</font>., then ordinary.
</p>
</BODY>
</HTML>

Reproducible: Always

Steps to Reproduce:
1. Just take the html file in "details" and open it in firefox.  (I'll be happy
to resupply it if it is corrupted by this transmission.)
Actual Results:  
The characters are not all displayed in the proper left-to-right positions.

Expected Results:  
Right-to-left display should be turned off immediately upon exiting a
right-to-left unicode font.

Comment 1

13 years ago
Product: Core - Component: Layout:BiDi Hebrew & Arabic ?
Created attachment 192532 [details]
reporter's testcase
This is INVALID - the current behaviour is correct.

According to the Unicode Bidirectional Layout algorithm
(http://www.unicode.org/reports/tr9/), a run of characters with weak types (such
as digits) should be laid out in the same direction of the strong-type
characters (e.g. letters) which it follows. The neutral characters in between (a
period, in your example) are then also laid out in the same direction. So the
entire "Hebrew Letters + period + digits" sequence is laid out right-to-left.
The closing or opening of inline elements (such as <font>, in this case) does
not (and should not) have an effect on this.

You can work around this in your case by placing a LRM control character where
you placed the "a" in your "working" example.

<p>
ordinary, then <font face="SBL
Hebrew">&#1488;&#1460;&#1497;&#1513;&#1473;</font>&lrm;.<a
  href="#sd"><sup>24</sup></a>, then ordinary.
</p>
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.