Sometimes it does make sense to use user-agent sniffing for blacklisting known-buggy browsers; at some point jquery.client.js got switched in to allow unrecognized browsers to pass through as assumed-good (which is good!)
However the version maps you pass to $.client.test() are in a whitelist format (eg, msie: [[">=", 7]] for "works on 7 or later") and it's hard to tell from calling code that it's actually a blacklist.
May encourage better coding practice to swap the order and use blacklist explicitly in the name, so eg WikiEditor's map might change to:
'browsers': {
// Left-to-right languages 'ltr': { // The toolbar layout is broken in IE6 'msie': [['<', 7]], // Layout issues in FF < 2 'firefox': [['<', 2]], // Text selection bugs galore - this may be a different situation with the new iframe-based solution 'opera': [['<', 9.6]], // jQuery minimums 'safari': [['<', 3]], 'chrome': [['<', 3]], 'netscape': [['<', 9]], 'blackberry': false, 'ipod': false, 'iphone': false }, // Right-to-left languages 'rtl': { // The toolbar layout is broken in IE 7 in RTL mode, and IE6 in any mode 'msie': [['<', 8]], // Layout issues in FF < 2 'firefox': [['<', 2]], // Text selection bugs galore - this may be a different situation with the new iframe-based solution 'opera': [['<', 9.6]], // jQuery minimums 'safari': [['<', 3]], 'chrome': [['<', 3]], 'netscape': [['<', 9]], 'blackberry': false, 'ipod': false, 'iphone': false }
This also makes obvious that we can drop some of those items -- the jQuery minimum numbers don't need to be checked if we're already not loading any of this JS because jQuery won't be supported. :)
Version: 1.20.x
Severity: enhancement