Opened 11 years ago
Closed 11 years ago
#11547 closed bug (fixed)
XML DOM .removeAttr() doesn't remove cased attributes
Reported by: | adebree | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | attributes | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In case of an XML DOM the .removeAttr() function doesn't remove cased attributes. XML is case sensitive so attributes provided with uppercase should be handled accordingly.
jsFiddle with the reproduction: http://jsfiddle.net/23w2d/
This problem seems to be introduced in 1.7, caused by an unconditioned .toLowerCase() in the removeAttr().
Pull request with the fix will be made after this ticket is created.
Change History (5)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Status: | new → open |
---|
Originally introduced here: https://github.com/jquery/jquery/commit/ce8d9c0ca59a8f03e119c80ed29c7dbc65efdd85#L0R357
The problem is that there were no tests that would've caught the regression.
comment:3 Changed 11 years ago by
Owner: | set to dmethvin |
---|---|
Status: | open → assigned |
comment:4 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Milestone: | None → 1.8 |
Priority: | undecided → low |
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #11547. toLowerCase not work good on XML attributes.
This was fixed to some extent in gh-724 but there were insufficient test cases. Removing the lowercase completely allows IE 6/7 to work properly since there you need an exact case match for attributes, even in HTML docs. More discussion and test cases in the comments on gh-724.
Changeset: f4e5c1729a2efe6086ac2407f82e928b26991f83
Pull request: https://github.com/jquery/jquery/pull/724