taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.11k stars 107 forks source link

Uppercase CLASS (with capitals) is not detected #75

Closed DenizBasgoren closed 3 years ago

DenizBasgoren commented 3 years ago

parser.parse('<div CLASS="a"></div>').querySelectorAll('.a') The code above returns [ ].

taoqf commented 3 years ago

Please use replace CLASS with class

parser.parse('<div CLASS="a"></div>'.toLowerCase()).querySelectorAll('.a')
DenizBasgoren commented 3 years ago

This is a workaround, however HTML states that tags and attributes are case insensitive. Please correct the behavior of your parser.

taoqf commented 3 years ago

Thanks for your report,

DenizBasgoren commented 3 years ago

Thanks