Skip to main content

Bug Tracker

Side navigation

#1445 closed bug (invalid)

Opened July 31, 2007 09:58AM UTC

Closed December 04, 2007 09:29AM UTC

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:
Blocked by: Blocking:
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*_\\\\-.]|\\\\\\\\.)" ) + "+)");

Attachments (0)
Change History (1)

Changed December 04, 2007 09:29AM UTC by davidserduke comment:1

milestone: 1.1.41.2.2
resolution: → invalid
status: newclosed

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