[whatwg] Script, style and backwards compatibility

Ian Hickson ian at hixie.ch
Fri May 9 09:37:59 PDT 2008


On Fri, 9 May 2008, Simon Pieters wrote:
> > > >
> > > > Is there really any need to escape the contents of 
> > > > <script>/<style> at all These days?
> 
> No, but AIUI the reaction was more like "Hey, HTML 5 doesn't say 
> anything about escaping <script>/<style>, does that mean that it doesn't 
> support escaped <script>/<style> and thus my pages will stop working in 
> browsers implementing HTML 5?".

Hm. What should I say? I can't really work out what to say that doesn't 
sound really weird.


> (FWIW, this:
> 
>    <script><!--
>     document.write('</script>')
>    //--></script>
> 
> ...works too and is allowed per HTML 5. Well, except that the written 
> </script> tag then results in a parse error.)

True. I don't think we really want to be mentioning that though, since the 
<!-- and --> bits aren't just syntax -- they're also in the script.

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



More information about the whatwg mailing list