Bug Tracker

Modify

Ticket #11449 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

Colon character in attributeHas (Browser compatibility)

Reported by: mark.andrus Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

Given the markup

<div class="button" data-namespace:id="1"></div>

jQuery 1.7.1 will correctly parse the following in the latest Chrome for OS X, but not in the latest Safari or Firefox on OS X, nor in the latest Chrome or the latest IE in Windows 7

jQuery('.button[data-namespace:id="1"]')

Change History

comment:1 Changed 2 years ago by mark.andrus

Here is a jsFiddle demonstrating the issue:  http://jsfiddle.net/j84KA/

Version 0, edited 2 years ago by mark.andrus (next)

comment:2 Changed 2 years ago by ajpiano

  • Status changed from new to closed
  • Resolution set to invalid

Thanks for taking the time to try to help out the jQuery project, but this is not a valid bug. As is clearly stated in the selector documentation: "'If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]`{|}~ ) as a literal part of a name, you must escape the character with two backslashes:"

As you can see, once the selector is escaped, it works fine.  http://jsfiddle.net/j84KA/1/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.