W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > August 2011

[Bug 11234] Invalidate documents whose text content contains improperly balanced bidi formatting characters

From: <bugzilla@jessica.w3.org>
Date: Mon, 08 Aug 2011 13:43:00 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QqQ6e-0004fy-9c@jessica.w3.org>

Aharon Lanin <aharon.lists.lanin@gmail.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from Aharon Lanin <aharon.lists.lanin@gmail.com> 2011-08-08 13:42:59 UTC ---
The checked-in change seems to say that the use of the formatting characters
(when restricted as specified) is perfectly fine:

"[Text content] may contain characters in the range U+202A to U+202E (the
bidirectional-algorithm formatting characters)."

"Note: *For convenience*, where possible authors will likely prefer to use the
dir attribute, the bdo element, and the bdi element, rather than maintaining
the bidirectional-algorithm formatting characters manually." (emphasis mine)

The use of the formatting characters, even when they obey the given rules,
should still be discouraged. It is *not* equivalent to the use of the dir
attribute and the bdo element, for two reasons. (BTW, the bdi element should
not be mentioned at all. There is no way to faithfully emulate its behavior
using the formatting characters.)

1. The dir attribute sets the element's directionality. The formatting
characters don't. That means that they do no affect the proposed CSS4
:dir(ltr|rtl} pseudo-class.

2. When used around an element that introduces bidi paragraph break, e.g. "LRE
<br> PDF" or "LRE <div></div> PDF", the formatting characters go completely
haywire, since the paragraph break resets the bidirectional state, so that the
effect of the opening character is lost after the paragraph break, and the
closing formatting character is unmatched. The effects of the dir attribute, on
the other hand, are carefully defined in CSS (via its effect on unicode-bidi)
to  be reopened after the paragraph break.

Neither of these can be fixed. Thus, the use of the formatting characters, even
when they obey the given rules, should be discouraged wherever mark-up can be
used instead. The bug as opened suggested ruling certain uses of formatting
characters completely invalid. It did not suggest pronouncing the remaining use
perfectly fine.

Certainly the use of the dir attribute etc. is more than a matter of
convenience. It is *the only recommended way* of declaring text direction in
HTML (except for those places where mark-up can not be used, e.g. inside
<option> and <title>). The use of both CSS and formatting characters for this
purpose is discouraged (for different reasons).

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 8 August 2011 13:43:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:00 UTC