Bug Tracker

Modify

Ticket #1445 (closed bug: invalid)

Opened 6 years ago

Last modified 5 years ago

last jQuery parse RegExp problems with some id or IE

Reported by: Andrea Giammarchi Owned by:
Priority: minor Milestone: 1.2.2
Component: core Version: 1.1.3
Keywords: RegExp,dotted,id Cc:
Blocking: Blocked by:

Description

RegExp used is not correct, IE6 gives me an error (looks for range between chars around "-") while in some case it doesn't work as expected.

element.id = "69-some_name.cmdview";

This id is not found.

Temporary double fix (works in my case):

jQuery.parse[3] = new RegExp("^([:.#]*)(" + (jQuery.chars = jQuery.browser.safari && jQuery.browser.version < "3.0.0" ? "\\w" : "(?:[\\w\u0128-\uFFFF*_\\-.]|\\\\.)" ) + "+)");

Change History

comment:1 Changed 5 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone changed from 1.1.4 to 1.2.2

This id is using invalid characters from a jQuery perspective. A '.' means a class is after it. These characters must be escaped for jQuery to find them. Please see the FAQ for more information:

 http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

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.