Skip to main content

Bug Tracker

Side navigation

#9752 closed bug (invalid)

Opened July 06, 2011 01:55AM UTC

Closed July 06, 2011 03:17AM UTC

Cannot access class names if class property contains a Non-Breaking Space as the first character

Reported by: fewds Owned by:
Priority: low Milestone: 1.next
Component: selector Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

If a class property has a " " in it as the first character jQuery will not pickup any classes for that element. However if you use a normal space bar to create the space it will successfully pickup the classes after the white space. So I would assume if its trimming white spaces from the beginning of the class property it should also trim off non-breaking spaces? For an example please check out this demo I made: http://jsfiddle.net/GhfVY/

Tested against jQuery 1.6.1 and jQuery 1.6.2 on a Mac (10.6.8) with Firefox 5

Attachments (0)
Change History (2)

Changed July 06, 2011 02:06AM UTC by fewds comment:1

Quickly updated the html just so I don't have to hear that the buttons ids are all the same. Anyhow here is the new example url: http://jsfiddle.net/fewds/GhfVY/2/

Changed July 06, 2011 03:17AM UTC by dmethvin comment:2

component: unfiledselector
priority: undecidedlow
resolution: → invalid
status: newclosed

The browsers seem to agree that is not valid to do that, for example if you try to target it with a CSS selector:

http://jsfiddle.net/dmethvin/GhfVY/6/

Note that if the non-breaking space is escaped the selection does work, so the browser considers it to be part of the class name and not a separator.