[html5] r4179 - [c] (0) Change how <script>'s content restrictions are written to make it more c [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Oct 19 17:55:46 PDT 2009


Author: ianh
Date: 2009-10-19 17:55:43 -0700 (Mon, 19 Oct 2009)
New Revision: 4179

Modified:
   complete.html
   index
   source
Log:
[c] (0) Change how <script>'s content restrictions are written to make it more clear what is allowed and what isn't, since with prose rules in ABNF it can be a bit ambiguous.

Modified: complete.html
===================================================================
--- complete.html	2009-10-20 00:32:01 UTC (rev 4178)
+++ complete.html	2009-10-20 00:55:43 UTC (rev 4179)
@@ -12822,23 +12822,21 @@
   <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 ] "-->" data1 ) [ escape ]
+escape        = "&lt!--" data2 *( script-start data3 script-end data2 )
 
-body1         = *( text1 / body2 )
-body2         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
-body3         = script-start *text3
+data1         = <any string that doesn't contain a substring that matches not-data1>
+not-data1     = script-end / "<!--"
 
+data2         = <any string that doesn't contain a substring that matches not-data2>
+not-data2     = script-end / script-start / "-->"
+
+data3         = <any string that doesn't contain a substring that matches not-data3>
+not-data3     = 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
 
-text1         = <anything that doesn't match not-text1>
-text2         = <anything that doesn't match not-text2>
-text3         = <anything that doesn't match not-text3>
-
-not-text1     = "<!--" / script-end
-not-text2     = script-start / script-end / "-->"
-not-text3     = script-end / "-->"
-
 lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
 slash         =  %x002F ; U+002F SOLIDUS character (/)
 

Modified: index
===================================================================
--- index	2009-10-20 00:32:01 UTC (rev 4178)
+++ index	2009-10-20 00:55:43 UTC (rev 4179)
@@ -12651,23 +12651,21 @@
   <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 ] "-->" data1 ) [ escape ]
+escape        = "&lt!--" data2 *( script-start data3 script-end data2 )
 
-body1         = *( text1 / body2 )
-body2         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
-body3         = script-start *text3
+data1         = <any string that doesn't contain a substring that matches not-data1>
+not-data1     = script-end / "<!--"
 
+data2         = <any string that doesn't contain a substring that matches not-data2>
+not-data2     = script-end / script-start / "-->"
+
+data3         = <any string that doesn't contain a substring that matches not-data3>
+not-data3     = 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
 
-text1         = <anything that doesn't match not-text1>
-text2         = <anything that doesn't match not-text2>
-text3         = <anything that doesn't match not-text3>
-
-not-text1     = "<!--" / script-end
-not-text2     = script-start / script-end / "-->"
-not-text3     = script-end / "-->"
-
 lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
 slash         =  %x002F ; U+002F SOLIDUS character (/)
 

Modified: source
===================================================================
--- source	2009-10-20 00:32:01 UTC (rev 4178)
+++ source	2009-10-20 00:55:43 UTC (rev 4179)
@@ -13425,23 +13425,21 @@
   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         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
-body3         = script-start *text3
+data1         = <any string that doesn't contain a substring that matches not-data1>
+not-data1     = script-end / "<!--"
 
+data2         = <any string that doesn't contain a substring that matches not-data2>
+not-data2     = script-end / script-start / "-->"
+
+data3         = <any string that doesn't contain a substring that matches not-data3>
+not-data3     = 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
 
-text1         = <anything that doesn't match not-text1>
-text2         = <anything that doesn't match not-text2>
-text3         = <anything that doesn't match not-text3>
-
-not-text1     = "<!--" / script-end
-not-text2     = script-start / script-end / "-->"
-not-text3     = script-end / "-->"
-
 lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
 slash         =  %x002F ; U+002F SOLIDUS character (/)
 




More information about the Commit-Watchers mailing list