Re: Issues arising from not reparsing

On Sat, 17 Oct 2009, Simon Pieters wrote:
> On Fri, 16 Oct 2009 23:58:15 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > 
> > So the proposed changes to the spec are:
> > 
> >   * in the Data state, while the escape flag is true, if the last start
> >     tag token emitted had the tag name "script", if you consume "t" or
> >     "T", then:
> > 
> >       if the previous characters were an ASCII case-insensitive match for
> >       "<scrip", then set the inner escape flag to true,
> >      if the previous characters were an ASCII case-insensitive match for
> >       "</scrip", then set the inner escape flag to false,
> >  * whenever the escape flag is set to false (-->), also set the
> >     inner-escape flag to false,
> > 
> >   * for "<" in the Data state, you always switch to the Tag open state, and
> > 
> >   * in the RCDATA/RAWTEXT bit at the top of the Close tag open state, add
> >     to the end of the first paragraph "or they are but the escape flag is
> >     true and either the last start tag token emitted did not have the tag
> >     name "script", or it was and the inner-escape flag is true"
> > 
> >   * in the RCDATA/RAWTEXT bit at the top of the Close tag open state, if
> >     the "Otherwise" clause is going to be followed, reset the escape flag
> >     to false.
> 
> Yes, I think that's about right.

Ok, done. I also removed the <!--/--> stuff from RCDATA and RAWDATA 
elements, and made it so that you needed the right characters after 
<script and </script to go into the inner-escape mode, so that <scripting> 
didn't trigger it also.

This also made the conformance requirements for <script> quite complex. I 
ended up using ABNF, but I couldn't quite work out how to do it without 
prose rules. If anyone can rephrase the ABNF for <script> restrictions 
without using prose rules, please let me know. (Also acceptable: a version 
of the ABNF in unambiguous English prose. I didn't even try in this case 
because I think it would be inpenetrable.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 20 October 2009 00:46:17 UTC