Page 1 of 1

RFE: make cseignore nesting compliant

PostPosted: Fri Dec 16, 2011 12:05 pm
by marcb
use <cseignore> quite a bit to exclude plugins etc. from the validation process. This is a great tool since many of these plugins are rather crappy as for their standards compliance.

However, today I ran into a problem due to the fact that I had omitted a </cseignore> closing tag. As a result, the validator excluded all following code from the validation until it ran into another <cseignore> block with a correct closing tag. As a result, I got all kind of nesting errors or errors for closing tags that were never opened, etc.

In such case, the ‘detected’ errors are no errors at all and unfortunately, they are often ‘detected’ far away from the real issue. So, it took me quite some time to find the real culprit.

So, I was wondering whether it would not be a good idea to impose on <cseignore> similar nesting rules as for <p> and <div> structs? I assume that the normal way of using it must be like that since otherwise you run into nesting errors, so…

Just an idea.

Re: RFE: make cseignore nesting compliant

PostPosted: Mon Dec 19, 2011 2:43 pm
by Albert Wiersch
Hello,

Thanks for the suggestion. I'll consider this for v12.

Re: RFE: make cseignore nesting compliant

PostPosted: Thu Sep 13, 2012 10:59 am
by Albert Wiersch
Would you still find this useful?

In the case that you mention, CSE HTML Validator should generate this error:
Found the "cseignore" tag contained in another "cseignore" tag. Was the first "cseignore" start tag ended properly with "</cseignore>"?

I'm not entirely sure the nesting of cseignore sections would be an overall good idea.

Re: RFE: make cseignore nesting compliant

PostPosted: Fri Sep 14, 2012 6:59 am
by marcb
Hello Albert,

Well, this is certainly not a major issue and, in case you wondered, it will not stop me from buying the next upgrade. :wink: Still, I think it would be a nice additional check. As I explained in my post, the first time you have this type of issue, you really have no clue what causes all these errors. But also, you might end up in situations where part of your coding remains unvalidated without you even knowing it, simply because the cseignore error did not cause other opening or closing errors.

However, from what I read in your sample warning message, I might have complicated things by using the word “nesting”.

Personally, I do not think that there are real life situations where you really want nested cseignore tags. It makes little sense. So, what I had in mind was more the type of control that is done for the p tag in XHTML, where you have to close the tag and where you cannot open the next one before closing the previous one.

However, as said, not a real issue.

MarcB

Re: RFE: make cseignore nesting compliant

PostPosted: Fri Sep 14, 2012 4:50 pm
by Albert Wiersch
marcb wrote:Personally, I do not think that there are real life situations where you really want nested cseignore tags. It makes little sense. So, what I had in mind was more the type of control that is done for the p tag in XHTML, where you have to close the tag and where you cannot open the next one before closing the previous one.


Hello,

Yes, I agree, but recent versions of CSE HTML Validator should generate this error message when a "cseignore" tag is opened in a "cseignore" section:
Found the "cseignore" tag contained in another "cseignore" tag. Was the first "cseignore" start tag ended properly with "</cseignore>"?

If it is not, then please let me know.

Re: RFE: make cseignore nesting compliant

PostPosted: Sat Sep 15, 2012 6:45 am
by marcb
I wasn’t aware that this already had been implemented, but I must admit that I never read the release notes. However, this does not yet seem to function as expected. I tested with a page that contained 2 cseignore blocks. You can find this page at http://www.xpragma.com/view199.php.

I first removed the closing tag of the first block, which should trigger the condition of nested cseignores. However, the validation only resulted in a closing error for a p tag, but no specific cseignore message.

I then did a similar test removing the closing tag of the second block and validated, resulting in closing errors for divs, p, etc. but no specific cseignore message.

CSE v11?0230, tests done via the browser panel.

Side note: while doing these tests, I got a (correct) warning message 135 for an invalid character; which apparently currently seems to be missed by the batch validator.

Re: RFE: make cseignore nesting compliant

PostPosted: Mon Sep 17, 2012 6:26 am
by Albert Wiersch
marcb wrote:I wasn’t aware that this already had been implemented, but I must admit that I never read the release notes. However, this does not yet seem to function as expected. I tested with a page that contained 2 cseignore blocks. You can find this page at http://www.xpragma.com/view199.php.

I first removed the closing tag of the first block, which should trigger the condition of nested cseignores. However, the validation only resulted in a closing error for a p tag, but no specific cseignore message.


Thank you. I believe I see the problem. It has something to do with using the HTML comment form of the "cseignore" tags. I'll work on getting this fixed in the upcoming v12 BETA so the expected error message is also displayed in this case.

marcb wrote:Side note: while doing these tests, I got a (correct) warning message 135 for an invalid character; which apparently currently seems to be missed by the batch validator.


It may be something to do with a character encoding issue. It's possible the document is being treated as having different character encodings. Did you encounter this problem on http://www.xpragma.com/view199.php? If you'd like me to also look into this issue, then please provide more details and a sample document that I can use to reproduce this issue.

Re: RFE: make cseignore nesting compliant

PostPosted: Mon Sep 17, 2012 7:09 am
by marcb
Yes, the URL I mentioned in my previous message is the one that contains an invalid character on line 135.

Re: RFE: make cseignore nesting compliant

PostPosted: Mon Sep 17, 2012 2:44 pm
by Albert Wiersch
marcb wrote:Yes, the URL I mentioned in my previous message is the one that contains an invalid character on line 135.


Thank you. I have a suspicion why this may be happening and have made a note to look into this.

The issue with the "cseignore" nesting error messages not being generated should be fixed in the upcoming v12 BETA. If you can, please confirm this (though the BETA is not yet released - but should be this week).

http://www.htmlvalidator.com/freebeta/