Bug Tracker

Opened 16 years ago

Closed 15 years ago

Last modified 12 years ago

#2413 closed bug (duplicate)

incorrect browser version (1.2.3, not fixed)

Reported by: redguy Owned by:
Priority: major Milestone: 1.2.3
Component: core Version: 1.2.3
Keywords: browser version ie7 Cc:
Blocked by: Blocking:

Description

my browser (IE7 under Vista Ultimate) introduces himself as:

navigator Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; FDM)

(notice the second occurance of compatible; MSIE 6.0) core jQuery, when getting browser version gets the second one, which is wrong...

changing line 1217 of full distribution ( 1216 line of core.js ) from:

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

to

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

fixes this problem, but I haven't tested it on other browsers and configurations yet. It works in my case... the difference is in question mark after plus - which finds shortest matching string, so the re gets the first occurance of MSIE 7.0.

Change History (3)

comment:1 Changed 15 years ago by dmethvin

#1537 is a duplicate of this bug, the given regexp should fix that one as well.

comment:2 Changed 15 years ago by dmethvin

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

comment:3 Changed 15 years ago by brandon

Resolution: duplicate
Status: newclosed

duplicate of #2661

Note: See TracTickets for help on using tickets.