Bug Tracker

Modify

Ticket #4843 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

Broken Internet Explorer's with Mutilated User Agents Fix

Reported by: bobmajdakjr Owned by:
Priority: minor Milestone: 1.4
Component: support Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

We have had a problem for a while now with some new Javascript we did using jQuery where SOME people using IE7 and IE8 would be reporting as IE6 and thusly causing a lot of the code to break. After lots of head banging I found out the user agent was this:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.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 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618)

Or with similar mutilations.

I have however found a work-around that seems to be working with no ill effects.

Line 1170 of jQuery:

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

with an added question mark in the regex here at the beginning:

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

It might be worth applying if you see it working well, seems to be good on ours.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Component changed from core to support

comment:2 Changed 4 years ago by dmethvin

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

This was fixed in 1.4.

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.