Side navigation
#11547 closed bug (fixed)
Opened April 02, 2012 10:24PM UTC
Closed July 12, 2012 03:14AM UTC
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:
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.
Attachments (0)
Change History (5)
Changed April 02, 2012 10:39PM UTC by comment:1
Changed April 03, 2012 12:23AM UTC by comment:2
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.
Changed June 02, 2012 03:15PM UTC by comment:3
owner: | → dmethvin |
---|---|
status: | open → assigned |
Changed July 12, 2012 01:55AM UTC by comment:4
component: | unfiled → attributes |
---|---|
milestone: | None → 1.8 |
priority: | undecided → low |
Changed July 12, 2012 03:14AM UTC by comment:5
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