Closed Bug 703234 Opened 13 years ago Closed 13 years ago

Display text passed to script dialogs (alert(), confirm(), etc.) according to the UBA's rules P1, P2, and P3

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 652550

People

(Reporter: aharon, Unassigned)

References

(Blocks 1 open bug)

Details

The HTML5 spec (http://dev.w3.org/html5/spec/Overview.html#text-rendered-in-native-user-interfaces) states:

A string provided by a script (e.g. the argument to window.alert()) is expected to be treated as an independent set of one or more bidirectional algorithm paragraphs when displayed, as defined by the bidirectional algorithm, including, for instance, supporting the paragraph-breaking behaviour of U+000A LINE FEED (LF) characters. For the purposes of determining the paragraph level of such text in the bidirectional algorithm, this specification does not provide a higher-level override of rules P2 and P3.

The last sentence implies that each paragraph's directionality is determined by the paragraph's first character with strong directionality.

According to the Unicode spec (http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBidiClass.txt), the following are paragraph separators:
U+000A, U+000D, U+001C, U+001D, U+001E, U+0085, U+2029.

HTML5 bug on the basis of which the spec was changed:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10827
Note that since dialog text is already shown inside an element with preformatted whitespace, the bug can be fixed very easily, by applying unicode-bidi:plaintext to that element (which is, BTW, the default for <pre dir=auto>).
Blocks: html5bidi
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.