-
-
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
Boolean attributes should not be special in xmlMode #1805
Closed
Comments
@fb55 That makes sense to me. |
fb55
changed the title
Boolean attribute behavior different from jquery and undocumented
Boolean attributes should not be special in xmlMode
Apr 14, 2021
fb55
added a commit
that referenced
this issue
Jun 2, 2021
fb55
added a commit
that referenced
this issue
Jun 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For HTML boolean attributes cheerio's attr() method behavior is both different from jquery and undocumented:
This behavior was apparently intentional, and commented in the source for getAttr() https://cheerio.js.org/lib_api_attributes.js.html, and made for made for #570. Stated reason was "jquery behaviour is to return the attrribute name when present", but I cannot find any version of jquery where that is the actual behavior. This may have related behavior for attribute setting, though I have not tested that.
Suggest one of the following:
The text was updated successfully, but these errors were encountered: