taoqf / node-html-parser

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

Uppercase CLASS (with capitals) is not detected #75

Closed DenizBasgoren closed 4 years ago

DenizBasgoren commented 4 years ago

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

taoqf commented 4 years ago

Please use replace CLASS with class

parser.parse('<div CLASS="a"></div>'.toLowerCase()).querySelectorAll('.a')
DenizBasgoren commented 4 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 4 years ago

Thanks for your report,

DenizBasgoren commented 4 years ago

Thanks