W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2008

[whatwg] Script, style and backwards compatibility

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 9 May 2008 06:06:19 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0805090605360.16669@hixie.dreamhostps.com>
On Fri, 9 May 2008, ?ke J?rvklo wrote:
> 2008/5/9 Ian Hickson <ian at hixie.ch>:
> >
> > Is there really any need to escape the contents of <script>/<style> at 
> > all These days?
> 
> I don't know - does HTML5 currently handle situations like <script 
> type="text/javascript">document.write('</script>');</script> for 
> text/html serializations?

Sure, you just do the same as you've always had to do:

 <script type="text/javascript">
  document.write('<\/script>');
 </script>

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 8 May 2008 23:06:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:02 UTC