Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <9015391.7lMVvsVivV@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 03 Apr 2012 21:17:41 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: A way of displaying an active Script Newsgroups: comp.lang.javascript References: <8phmn7poe06lnu5d95na71afnkjvkted1e@4ax.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 44 NNTP-Posting-Date: 03 Apr 2012 21:17:42 CEST NNTP-Posting-Host: f592c2c8.newsspool4.arcor-online.net X-Trace: DXC=S[0Yahk\J:\E47KDAk81NW4IUK Dr J R Stockton [wrote]: >> I thought I'd try this, without much hope. It works in Firefox Opera >> Safari & Chrome; in IE8, the script is executed but not shown. IE 9/10 ? > Works in IE 9 > > This even works in IE5.5! > > > > > test > > > aaa > " > zzz > 0. Declare `A'. 0.1. Append a semicolon to the script's first line (yes, it is an example; a bad one). 1. Drop document.writeln() in favor of document.write() or methods introduced with W3C DOM Level 2 (which IE/MSHTML supports from version 5.0 on). 2. If you use document.write(), escape at least the `<' in the generated script code. If you use the new methods, nothing needs to/must be escaped, though. 3. Remove the extra `"'. Please do not post attribution novels, and get a real name. PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14