Skip to main content

Bug Tracker

Side navigation

#2661 closed bug (fixed)

Opened April 06, 2008 03:54PM UTC

Closed December 09, 2009 06:44AM UTC

Last modified March 14, 2012 05:39AM UTC

Browser detection IE (and possibly other browsers)

Reported by: cybernetix Owned by: flesler
Priority: major Milestone: 1.4
Component: core Version: 1.4a1
Keywords: browser detection Cc:
Blocked by: Blocking:

If MEGAUPLOAD or similar plugin is installed jQuery.browser returns wrong IE version.

For example userAgent string for IE7 with installed MEGAUPLOAD plugin is:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; MEGAUPLOAD 2.0)

jQuery.browser.version returns 6 instead of 7

First plus (+) should be removed from regExp and than it will work fine. So, this line:

(userAgent.match( /.+(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/ ) || [])[1]

should read:

(userAgent.match( /.(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/ ) || [])[1]

Attachments (0)
Change History (16)

Changed May 06, 2008 03:27AM UTC by flesler comment:1

owner: → flesler
status: newassigned

Same as #2784

Changed May 14, 2008 08:29PM UTC by flesler comment:2


Changed July 03, 2008 03:26AM UTC by eventualbudd comment:3

The solution you posted doesn't actually work with Opera. Here's one that passes all the jQuery tests (thanks Brad Greenlee!):

/.+?(?:rv|it|ra|ie)[\\/: ]([\\d.]+)(?!.+opera)/

Changed January 14, 2009 04:30AM UTC by dmethvin comment:4

See also #3169 (dup but essentially agrees on the regexp)

Changed January 15, 2009 04:42AM UTC by dmethvin comment:5

Tickets #3696, #3402, #2661, and #2413 are all related, but for different user-agents.

Changed January 23, 2009 02:53PM UTC by mesoconcepts comment:6

Changed January 23, 2009 02:54PM UTC by mesoconcepts comment:7

cross-referencing in case someone on the WP end submits a patch:

Changed March 18, 2009 03:07AM UTC by brandon comment:8

I've closed the following bugs as duplicates of this one to consolidate the conversations/fixes. When fixing this bug, please be sure that the fix addresses these other issues as well.

#4338, #3696, #3402, #2413, #3169, #2748, and #1537

Changed May 20, 2009 12:31AM UTC by dmethvin comment:9

Adding dup #4674 to the pile.

Changed June 05, 2009 02:17AM UTC by dmethvin comment:10

Also dup #4722.

Changed June 16, 2009 01:12AM UTC by dmethvin comment:11

Boop boop be dup #4754.

Changed September 24, 2009 02:24AM UTC by dmethvin comment:12

See also #5279.

Changed September 24, 2009 03:48AM UTC by dmethvin comment:13

See also #5127.

Changed November 04, 2009 05:08PM UTC by hm2k comment:15

Changed December 09, 2009 06:44AM UTC by john comment:16

resolution: → fixed
status: assignedclosed