On Sat, Aug 29, 2015 at 06:04:04AM -0400, Karl Dahlke wrote: > Debug prints are in, and seem to work. > Thanks Kevin. Well done all for the work, appologies for being somewhat inactive recently but I've been busy with the day job and simply haven't had any time to do anything computing related outside of the office. > Here is my test page, that I was worried about. > > > > jf test > > hello world > > > > I browse with db6, there is lots of js debugging, > I'll leave that out, here are the relevant lines. > > line 7 column 67: '<' + '/' + letter not allowed here > Node(0): Text > Text: hello world > Node(0): script > type = text/javascript > Node(1): Text > Text: document.writeln("This is <A href=http://edbrowse.org>our > website<\/A>"); > # end of tidy debug output, next stuff is ours > execute jf at 6 > < side effects > w{This is our website > `~@} > < ok > execution complete > docwrite 62 bytes > << > This is our website > >> > anchorSwap 4 > anchors unframed > whitespace combined > > Right off the bat I'm concerned becausee tidy shows an error > where there is no error. > It is trying to interpret the tag in the string, in the script, > and it shouldn't be doing that at all. Actually, yes it should. This is one of the corner cases with html; everything within a script tag is not parsed except the sequence Next I look at the text node under the script, > the text that is to be passed to the js engine, and it has been html escaped. > is now <a> > Why? > That would totally screw things up. > Is it escaped and interpreted for the benefit of printing, for us, > or is it done by cleanup? > If the latter then we can't use tidy5 unless this is fixed. > This is a show stopper. > They can't be mucking with the contents of a js script at all. > In fact they shouldn't muck with the contents of any script. Actually, see above for how script tags should behave. I think it's actually our current parser which is slightly broken. Not sure about the escaping part though. Cheers, Adam.