Side navigation
#10773 closed bug (fixed)
Opened November 13, 2011 08:10AM UTC
Closed November 14, 2011 04:32PM UTC
Last modified March 08, 2012 07:09PM UTC
removeAttr is fragile for edge cases
Reported by: | markel | Owned by: | dmethvin |
---|---|---|---|
Priority: | low | Milestone: | 1.7.1 |
Component: | attributes | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If argument for removeAttr is:
1) not a string( http://jsfiddle.net/G4wfm/ ),
2) empty string ( http://jsfiddle.net/G4wfm/1/ ),
3) nothing ( http://jsfiddle.net/G4wfm/3/ ),
4) string with additional space in the end ( http://jsfiddle.net/G4wfm/2/ ).
Than it produces a error.
Last one also exist for toggleClass(), addClass() and removeClass(). But for them its just a needless loop iteration.
Attachments (0)
Change History (3)
Changed November 13, 2011 07:38PM UTC by comment:1
component: | unfiled → attributes |
---|---|
milestone: | None → 1.7.1 |
priority: | undecided → low |
status: | new → open |
version: | → 1.7 |
Changed November 14, 2011 04:13PM UTC by comment:2
owner: | → dmethvin |
---|---|
status: | open → assigned |
In general we don't want to start down the road of parameter paranoia, so I wouldn't land this if that was the only reason. It does solve a few other issues and doesn't take a lot of bytes so I'm ok with it.
I'd call #1 invalid.
The change is simple enough tho: third party pull.