Re: Issues arising from not reparsing

On Tue, 27 Oct 2009 09:34:27 +0100, Ian Hickson <ian@hixie.ch> wrote:

> On Mon, 26 Oct 2009, Simon Pieters wrote:
>>
>> <script><!-- d.w('<script><\/script>'); //--></script>
>> <script><!-- d.w('<script></script\>'); //--></script>
>> <script><!-- d.w('<script></scr'+'ipt>'); //--></script>
>
> All three are valid per the current spec. For the first one:
>
>   script        = data1              ; empty
>                   *( escape          ; "<!-- d.w('" (see [1] below)
>                      [ script-start  ; <script>
>                        data3 ]       ; "<\/script>'); //"
>                      "-->"           ; "-->"
>                      data1 )         ; empty
>                   [ escape ]         ; empty
>
> [1] substring:
>
>   escape        = "<!--"             ; "<!--"
>                   data2              ; " d.w('"
>                   *( script-start data3 script-end data2 ) ; empty
>
> The other two are valid in much the same way, except replace "<\/script>"
> with the equivalent bits.

Ok. I guess validators could still issue a warning.

-- 
Simon Pieters
Opera Software

Received on Tuesday, 27 October 2009 09:39:01 UTC