24 ways to impress your friends

Jump to menu

Vote down?

Gunnar Bittersmann

It’s as much fun to read your articles as it was to hear you talk at beyond tellerrand. :-)

IIRC the ‘<’ in <script>document.write(’<’ + ‘!—’)</script> is problematic in XHTML. Either the script element content needs to be marked as CDATA, or the ‘<’ (U+003C) should be escaped. There’s no need for string concatenation then: <script>document.write(’\u003C!—’)</script>

<noscript —> is a typo, right? it should be </noscript —>. However, </noscript><script>document.write(’—>’)</script> might be less dirty.