Bug Tracker

Modify

Ticket #2413 (closed bug: duplicate)

Opened 5 years ago

Last modified 14 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 4 years ago by dmethvin

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

comment:2 Changed 4 years ago by dmethvin

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

comment:3 Changed 4 years ago by brandon

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

duplicate of #2661

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.