keithclark / selectivizr

selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
1.71k stars 247 forks source link

IE version regex isn't IE10 proof #2

Closed paulirish closed 13 years ago

paulirish commented 13 years ago
var ieVersion = /MSIE ([\d])/.exec(navigator.userAgent)[1];

you're gonna want a + after that \d

Now this bug doesnt really affect anything since you discard IE before 6 and after 8 (until we hit IE version 60...)

but it's good to have this fixed in case someone else snags that code for their own use.

keithclark commented 13 years ago

Good point.

keithclark commented 13 years ago

Fixed regex in this commit:

https://github.com/keithclark/selectivizr/commit/56335f4f1610c639625db14d1c1293aaf378e748