Bug Tracker

Opened 11 years ago

Closed 11 years ago

#4338 closed bug (duplicate)

Wrong browser version in IE with mail.ru agent software

Reported by: platosha Owned by:
Priority: minor Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

There's a problem in browser version recognition code. Mail.Ru Agent software adds its version in IE userAgent string like this:

mozilla/4.0 (compatible; msie 7.0; windows nt 5.1; mra 4.9 (build 01863))

Notice the mra word added by mail.ru agent. It confuses jQuery browser version detection code:

jQuery.browser = {
    version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
    ...
};

In this case the version detection regular expression erroneously considers that browser version is 4.9.

To avoid this bug I suggest using full engine names insted of two-lettershortenings in browser detection regexp. Example:

jQuery.browser = {
    version: (userAgent.match( /.+(?:rv|webkit|khtml|opera|msie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
    ...
};

Change History (1)

comment:1 Changed 11 years ago by brandon

Resolution: duplicate
Status: newclosed

duplicate of #2661

Note: See TracTickets for help on using tickets.