Browser version regex fix
We've had some IE7 users with a user agent like:
"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)"
which jquery incorrectly identifies as IE 6.0. I found this ticket:
http://dev.jquery.com/ticket/2784
but the originally proposed regex breaks a couple of the Opera tests.
I've uploaded a patch to that ticket that passes all current tests
(plus the above UA).
As an aside, I was just wondering if there was a reason toLowerCase()
is called on the userAgent, rather than just using the case-
insensitive regex modifier (/i). Is that faster?
Cheers,
Brad