From: Aryeh Gregor Date: Sun, 2 May 2010 01:59:08 +0000 (+0000) Subject: Improve IE6 version check to avoid false positives X-Git-Tag: 1.31.0-rc.0~36965 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=3fd89639cf5e666e8a5863f719eb58694a29ef71;p=lhc%2Fweb%2Fwiklou.git Improve IE6 version check to avoid false positives Bug 23171. Not added to RELEASE-NOTES because I'll backport to 1.16. --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 2a75478ab5..6967b7ba20 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -25,8 +25,14 @@ if (clientPC.indexOf('opera') != -1) { var opera7_bugs = is_opera_seven && !is_opera_95; var opera95_bugs = /opera\/(9\.5)/.test( clientPC ); } -// Start at 4 to minimize the chance of breaking on IE10 :) -var ie6_bugs = /msie [4-6]/.test( clientPC ); +// As recommended by , +// avoiding false positives from moronic extensions that append to the IE UA +// string (bug 23171) +var ie6_bugs = false; +if ( /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec( clientPC ) != null +&& parseFloat( RegExp.$1 ) <= 6.0 ) { + ie6_bugs = true; +} // Global external objects used by this script. /*extern ta, stylepath, skin */