Skip to content

Commit

Permalink
[c] (0) Change how <script>'s content restrictions are written to mak…
Browse files Browse the repository at this point in the history
…e it more clear what is allowed and what isn't, since with prose rules in ABNF it can be a bit ambiguous.

git-svn-id: http://svn.whatwg.org/webapps@4179 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 20, 2009
1 parent bc1466f commit 289ae9e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
22 changes: 10 additions & 12 deletions complete.html
Expand Up @@ -12822,22 +12822,20 @@ <h5 id=restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </
<code title="">script</code> production in the following ABNF, the
character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>

<pre>script = body1
<pre>script = data1 *( escape [ script-start data3 ] "--&gt;" data1 ) [ escape ]
escape = "&amp;lt!--" data2 *( script-start data3 script-end data2 )

body1 = *( text1 / body2 )
body2 = "&lt;!--" *( text2 / body3 script-end ) [ body3 ] "--&gt;"
body3 = script-start *text3
data1 = &lt;any string that doesn't contain a substring that matches not-data1&gt;
not-data1 = script-end / "&lt;!--"

script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end
data2 = &lt;any string that doesn't contain a substring that matches not-data2&gt;
not-data2 = script-end / script-start / "--&gt;"

text1 = &lt;anything that doesn't match not-text1&gt;
text2 = &lt;anything that doesn't match not-text2&gt;
text3 = &lt;anything that doesn't match not-text3&gt;
data3 = &lt;any string that doesn't contain a substring that matches not-data3&gt;
not-data3 = script-end / "--&gt;"

not-text1 = "&lt;!--" / script-end
not-text2 = script-start / script-end / "--&gt;"
not-text3 = script-end / "--&gt;"
script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end

lt = %x003C ; U+003C LESS-THAN SIGN character (&lt;)
slash = %x002F ; U+002F SOLIDUS character (/)
Expand Down
22 changes: 10 additions & 12 deletions index
Expand Up @@ -12651,22 +12651,20 @@ o............A....e
<code title="">script</code> production in the following ABNF, the
character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>

<pre>script = body1
<pre>script = data1 *( escape [ script-start data3 ] "--&gt;" data1 ) [ escape ]
escape = "&amp;lt!--" data2 *( script-start data3 script-end data2 )

body1 = *( text1 / body2 )
body2 = "&lt;!--" *( text2 / body3 script-end ) [ body3 ] "--&gt;"
body3 = script-start *text3
data1 = &lt;any string that doesn't contain a substring that matches not-data1&gt;
not-data1 = script-end / "&lt;!--"

script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end
data2 = &lt;any string that doesn't contain a substring that matches not-data2&gt;
not-data2 = script-end / script-start / "--&gt;"

text1 = &lt;anything that doesn't match not-text1&gt;
text2 = &lt;anything that doesn't match not-text2&gt;
text3 = &lt;anything that doesn't match not-text3&gt;
data3 = &lt;any string that doesn't contain a substring that matches not-data3&gt;
not-data3 = script-end / "--&gt;"

not-text1 = "&lt;!--" / script-end
not-text2 = script-start / script-end / "--&gt;"
not-text3 = script-end / "--&gt;"
script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end

lt = %x003C ; U+003C LESS-THAN SIGN character (&lt;)
slash = %x002F ; U+002F SOLIDUS character (/)
Expand Down
22 changes: 10 additions & 12 deletions source
Expand Up @@ -13425,22 +13425,20 @@ o............A....e
character set for which is Unicode. <a
href="#refsABNF">[ABNF]</a></p>

<pre>script = body1
<pre>script = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]
escape = "&lt!--" data2 *( script-start data3 script-end data2 )

body1 = *( text1 / body2 )
body2 = "&lt;!--" *( text2 / body3 script-end ) [ body3 ] "-->"
body3 = script-start *text3
data1 = &lt;any string that doesn't contain a substring that matches not-data1>
not-data1 = script-end / "&lt;!--"

script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end
data2 = &lt;any string that doesn't contain a substring that matches not-data2>
not-data2 = script-end / script-start / "-->"

text1 = &lt;anything that doesn't match not-text1>
text2 = &lt;anything that doesn't match not-text2>
text3 = &lt;anything that doesn't match not-text3>
data3 = &lt;any string that doesn't contain a substring that matches not-data3>
not-data3 = script-end / "-->"

not-text1 = "&lt;!--" / script-end
not-text2 = script-start / script-end / "-->"
not-text3 = script-end / "-->"
script-start = lt s c r i p t tag-end
script-end = lt slash s c r i p t tag-end

lt = %x003C ; U+003C LESS-THAN SIGN character (&lt;)
slash = %x002F ; U+002F SOLIDUS character (/)
Expand Down

0 comments on commit 289ae9e

Please sign in to comment.