On Sun, Aug 30, 2015 at 09:26:51AM +0100, Adam Thompson wrote: > On Sat, Aug 29, 2015 at 12:05:50PM -0400, Karl Dahlke wrote: > > > If we want to print tidy warnings for local files fair enough, > > > but lets make it a user's choice, > > > > Actually I'm kinda stupid here. > > I built these mashinations for local files or remote files, > > and exceptions through some mechanism, filename or config options etc, > > but really all I need to do is print the tidy errors at debugLevel 3 or above. > > None of our users are going to want to see them, > > except a rare few who write their own html, > > and they can get along with db3 to check their sourcefiles. > > So that's what I should do, but still not what I'm worried about. > > I agree that's the correct approach. Thanks for making this change. > > > I wonder if it's just a printing thing or something. > > > > Oh I hope it is, but I fear it's not. > > (This would be a great time for me to be wrong.) > > We aren't passing the contents of script.text to the js engine yet, > > but some day we will, when tidy replaces all my software, > > and on that day we will be passing > > > > if(3 < 4) > > > > instead of > > > > if(3 < 4) > > > > At least that's how it appears. > > As I said, this doesn't tally with what I'm seeing from the actual tidy tool > (the tidy 5 version) which uses the same library as we do, > so I suspect we're doing something incorrectly somewhere. > I'll have a look at that code to see what they're doing differently. It turns out what we wanted was tidyNodeGetValue which doesn't do escaping unlike tidyNodeGetText. I've made, tested and pushed this change.