Open wnayes opened 4 years ago
"BuTTon" and "bUTToN" are equal by EqualsNoCase
, but does ASP.NET handle such cases or just assume that the open and close tags can start with lower char? If ASP.NET compares more strong than EqualsNoCase
, we should compare the same way, else PR LGFM.
I think this code in TemplateParser.cs is specifically where they do a case insensitive check for close tag names:
https://referencesource.microsoft.com/#System.Web/UI/TemplateParser.cs,2791
Similarly, for tag prefixes I think this is reference source that shows they do case insensitive checks for those as well:
https://referencesource.microsoft.com/#System.Web/UI/TagNameToTypeMapper.cs,342
I've seen cases where programmers use inconsistent tag casing for open and close tags.
ASP.NET is able to cope with this, but AspxParser will end up with an imbalance in the syntax tree.
These can be a little hard to track down, but it is reasonable to work around this issue by fixing the problem cases in the markup.