Solicit feedback on Script Parsing

Previous Topic Next Topic
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Solicit feedback on Script Parsing

Jim Derry
(first posted on

Cross-posted to
[1]: ([hidden email])
[2]: ([hidden email])
[3]: ([hidden email])

Good day list subscribers:

I’m re-posting this to the larger set of mailing lists so that we can determine your expectations for Tidy behavior. It was first posted by Geoff (as above), and there’s some continuing discussion in the bug tracker at You can find more background on this discussion in both locations (i.e., the list and the issues tracker).

This solicitation is to ask for your feedback on what the desired, default behaviour for Tidy should be given certain conditions.

Geoff’s latest proposal (quoted from

>No it probably does NOT effect very many... and as
>you point out is a VERY OLD BUG, since LONG before the
>2009 release...
>As mentioned in my previous post, I will find the
>time to review my now OLD patch, update it, and
>cut it into Tidy5...
>At this time I do NOT see the need for another
>configuration option... just give Tidy the ability
>to skip over '<', '>' if in a script block, and in
>single or double quotes, and even skip comments
>// and /* ... */
>And yes, if there is a need for an option, then it
>should default on, only offering the ability to
>turn it off... but why would you want that given the
>MESS Tidy will then generate...

Public feedback appreciated on any of these lists or in the issue tracker. Thanks!

Jim Derry

Reply | Threaded
Open this post in threaded view

Re: [Tidy-dev] Solicit feedback on Script Parsing

Geoff McLane
On Mon, Mar 9, 2015 at 2:40 PM, Peter Hoffmann <[hidden email]> wrote:
> Doesn't
> say, that you must not use the string '<script…' inside the script-element?

@HoffmannP, thanks for that link. Yes, it does clearly indicate that `<script` should not be in a script element.

However, if that is the case then the W3C validator is also in error by not flagging this as 'invalid'! Is this maybe a validator bug?

But then what about the role of tidy as a 'fixer'. My patch could see this is in inverted commas, and could add the escaped `<\script` to successfully fix the document, probably with a warning.

It just seems to me the current MESS that tidy outputs in this case is quite unacceptable -

var a = '<script';

Or alternatively at least to flag it as an error, thus no output unless forced. The idea is to not generate what would be seen as invalid javascript! That is a seriously compromised document.

What do you think? Will also try to cross-post this to the lists to perhaps have a wider audience.