Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13968 closed bug (notabug)

selector functionality broken

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

Please refer : http://jsfiddle.net/NHgBP/1/

In jQuery 1.7.2 the above piece of code works perfectly. But in 1.9.1 it fails. Seems like in 1.9.1 the selector functionality has been broken and it no longer handles '[' properly. Due to this jQuery mobile is broken as well

Please refer https://github.com/jquery/jquery-mobile/issues/6052

jQuery mobile thinks this is a bug in the core

Change History (7)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

no longer handles '[' properly

The test case reduces to $("chk['3']-1"). The [ is not escaped properly. It isn't even an id selector.

https://www.google.com/search?q=jquery+escape+id+selector

comment:3 Changed 10 years ago by [email protected]

This works well with jQuery < 1.8

Please see

https://github.com/jquery/jquery-mobile/issues/6052

jQuery mobile functionality is broken due to this issue.

comment:4 Changed 10 years ago by gibson042

Yes, we were pleased to bring in many Sizzle improvements with jQuery 1.8, particularly those around parsing selectors.

comment:5 Changed 10 years ago by [email protected]

You guys are saying this is not a bug.. jQuery mobile guys are saying it's an issue in the core.. :-) What should the users be doing.. stop using latest jQuery or stop using latest jQuery mobile

comment:6 Changed 10 years ago by dmethvin

Us guys are trying to be nice to someone who doesn't understand and is not listening. The current version of jQuery is doing this properly. You are not escaping your selectors. I posted a working example above. Here is another example. Look at it carefully.

http://jsfiddle.net/NHgBP/4/

comment:7 in reply to:  6 Changed 10 years ago by [email protected]

Replying to dmethvin:

Us guys are trying to be nice to someone who doesn't understand and is not listening. The current version of jQuery is doing this properly. You are not escaping your selectors. I posted a working example above. Here is another example. Look at it carefully.

http://jsfiddle.net/NHgBP/4/

Thx people. I'm just using jQuery mobile. The sample code I used was to demonstrate the issue. This is an issue present in jQuery mobile. Just curious when suddenly things get broken which worked perfectly before...

Note: See TracTickets for help on using tickets.