-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #581 - coerce attribute names to lower case in HTML mode #3306
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: rjpatt <[email protected]> Co-authored-by: davidfei222 <[email protected]>
This PR updates Cheerio's |
Adjusted a few existing tests to be able to support tests for this fix. |
Thanks a lot for this PR! Some notes:
attrNameToUse = this.options.xmlMode ? attrName : attrName.toLowerCase() |
@fb55 Apologies for the late response - my colleagues and I have been very busy at work recently. The requested changes have been made - please re-review at your earliest convenience. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fix for issue #581. Attribute names will now always be coerced to lower case when attempting to get or set attributes to keep the behavior in line with how cheerio.load() handles attribute names.