HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
575411234[Authors] [Conformance Checkers] Define conformance criteria around bidi formatting characters2011-01-10 09:55
@@ -1,11 +1,11 @@
-a<!-- EDITOR NOTES
+<!-- EDITOR NOTES
  !
  !   Adding a new element involves editing the following sections:
  !    - description of the element's categories
  !    - images/content-venn.svg
  !    - syntax, if it's void or otherwise special
  !    - parser
  !    - rendering
  !    - obsolete section
  !    - element, attribute, content model, and interface indexes
  !    - section for the element itself
@@ -11086,20 +11086,21 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
 
   <p><dfn title="text content">Text</dfn>, in the context of content
   models, means <span title="text node">text nodes</span>. <span
   title="text content">Text</span> is sometimes used as a content
   model on its own, but is also <span>phrasing content</span>, and can
   be <span>inter-element whitespace</span> (if the <span title="text
   node">text nodes</span> are empty or contain just <span title="space
   character">space characters</span>).</p>
 
 
+
   <h6>Embedded content</h6>
 
   <p><dfn>Embedded content</dfn> is content that imports another
   resource into the document, or content from another vocabulary that
   is inserted into the document.</p>
 
   <!-- when updating this also update the category index -->
   <ul class="brief category-list">
    <li><code>audio</code></li>
    <li><code>canvas</code></li>
@@ -11511,20 +11512,79 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
    the last paragraph as if it was at the start of the second sentence
    of the first paragraph.</p>
 
    <p>To avoid this confusion, explicit <code>p</code> elements can be
    used.</p>
 
   </div>
 
 
 
+  <h4>Requirements relating to bidirectional-algorithm formatting
+  characters</h4>
+
+  <p><span>Text content</span> in <span>HTML elements</span> with
+  child <span title="text node">text nodes</span>, and text in
+  attributes of <span>HTML elements</span> that allow free-form text,
+  may contain characters in the range U+202A to U+202E (the
+  bidirectional-algorithm formatting characters). However, the use of
+  these characters is restricted so that any embedding or overrides
+  generated by these characters do not start and end with different
+  parent elements, and so that all such embeddings and overrides are
+  explicitly terminated by a U+202C POP DIRECTIONAL FORMATTING
+  character. This helps reduces incidences of text being reused in a
+  manner that has unforseen effects on the bidirectional
+  algorithm.</p>
+
+  <p>The aforementioned restrictions are defined by specifying that
+  certain parts of documents form <span>bidirectional-algorithm
+  formatting character ranges</span>, and then imposing a requirement
+  on such ranges.</p>
+
+  <p>The string resulting from the concatenation of the data of all of
+  an <span title="HTML elements">HTML element</span>'s <span
+  title="text node">text nodes</span>, if any, is a <span
+  title="bidirectional-algorithm formatting character
+  ranges">bidirectional-algorithm formatting character
+  range</span>.</p>
+
+  <p>The value of a namespace-less attribute of an <span title="HTML
+  elements">HTML element</span> is a <span
+  title="bidirectional-algorithm formatting character
+  ranges">bidirectional-algorithm formatting character
+  range</span>.</p>
+
+  <p>Any strings that, as described above, are
+  <dfn>bidirectional-algorithm formatting character ranges</dfn> must
+  match the <code title="">string</code> production in the following
+  ABNF, the character set for which is Unicode. <a
+  href="#refsABNF">[ABNF]</a></p>
+
+  <pre>string        = *( plaintext ( embedding / override ) ) plaintext
+embedding     = ( lre / rle ) string pdf
+override      = ( lro / rlo ) string pdf
+lre           = %x202A ; U+202A LEFT-TO-RIGHT EMBEDDING
+rle           = %x202B ; U+202B RIGHT-TO-LEFT EMBEDDING
+lro           = %x202D ; U+202D LEFT-TO-RIGHT OVERRIDE
+rlo           = %x202E ; U+202E RIGHT-TO-LEFT OVERRIDE
+pdf           = %x202C ; U+202C POP DIRECTIONAL FORMATTING
+plaintext     = *( %x0000-2029 / %x202F-10FFFF )
+                ; any string with no bidirectional-algorithm formatting characters</pre>
+
+  <p class="note">For convenience, where possible authors will likely
+  prefer to use the <code title="attr-dir">dir</code> attribute, the
+  <code>bdo</code> element, and the <code>bdi</code> element, rather
+  than maintaining the bidirectional-algorithm formatting characters
+  manually.</p>
+
+
+
   <h4><dfn>Annotations for assistive technology products</dfn> (ARIA)</h4>
 
   <p>Authors may use the ARIA <code title="attr-aria-role">role</code>
   and <code title="attr-aria-*">aria-*</code> attributes on <span>HTML
   elements</span>, in accordance with the requirements described in
   the ARIA specifications, except where these conflict with the
   <span>strong native semantics</span> described below. These
   exceptions are intended to prevent authors from making assistive
   technology products report nonsensical states that do not represent
   the actual state of the document. <a href="#refsARIA">[ARIA]</a></p>
@@ -16408,23 +16468,23 @@ o............A....e
   with unknown parameters must be assumed to be unsupported. The <code
   title="">charset</code> parameter must be treated as an unknown
   parameter for the purpose of comparing <span title="MIME type">MIME
   types</span> here.</p>
 
   </div>
 
 
   <h5><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
 
-  <p>The <code>textContent</code> of a <code>script</code> element must match the
-  <code title="">script</code> production in the following ABNF, the
-  character set for which is Unicode. <a
+  <p>The <code>textContent</code> of a <code>script</code> element
+  must match the <code title="">script</code> production in the
+  following ABNF, the character set for which is Unicode. <a
   href="#refsABNF">[ABNF]</a></p>
 
   <pre>script        = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]
 escape        = "&lt;!--" data2 *( script-start data3 script-end data2 )
 
 data1         = &lt;any string that doesn't contain a substring that matches not-data1>
 not-data1     = <!-- script-end / -->"&lt;!--"             <!-- the script-end is redundant here since it would close the element -->
 
 data2         = &lt;any string that doesn't contain a substring that matches not-data2>
 not-data2     = <!-- script-end / -->script-start / "-->"  <!-- the script-end is redundant here since it would close the element -->

|