The specification defines the behavior (see below), so it's not just a
matter of interpretation. This is a defect in IE. The question is how
precise does jQuery wish to be in its adherence to cross-browser
compatibility? Practically, your question is relevant, do we need to
worry? The cost is a some increase in file size and a little more time
in execution speed--both important factors. As a purist, I would want
it to adhere to spec and be cross-browser equivalent (I've already
changed my copy to be so). As a realist, a compromise would be
acceptable. Common white-space should be properly handled. I found the
defect because non-breaking spaces were ignored. The compromise would
be: [\t\x0b\f\x20\xa0\n\r], thus ignoring the multi-byte white space
characters. I didn't verify the exact interpretation of "\s" for
multiple versions of IE, but perhaps [\s\xa0] or [\s\n\xa0] would also
work.
The appropriate snippets of the spec follow:
ECMA-262 3rd Edition - December 1999
15.10.2.12 CharacterClassEscape
The production CharacterClassEscape :: s evaluates by returning the
set of characters containing the
characters that are on the right-hand side of the WhiteSpace (7.2) or
LineTerminator (7.3)
productions.
7.2 White Space
\u0009 Tab <TAB>
\u000B Vertical Tab <VT>
\u000C Form Feed <FF>
\u0020 Space <SP>
\u00A0 No-break space <NBSP>
Other category “Zs” Any other Unicode
“space separator”
7.3 Line Terminator
\u000A Line Feed <LF>
\u000D Carriage Return <CR>
\u2028 Line separator <LS>
\u2029 Paragraph separator <PS>
Unicode Regular Expressions
http://unicode.org/reports/tr18/ Unicode Regular Expression Guidelines
http://unicode.org/reports/tr18/tr18-6d2.html UNICODE CHARACTER DATABASE
http://www.unicode.org/Public/UNIDATA/UCD.html Revision 5.1.0
Date 2008-03-25
http://www.unicode.org/Public/UNIDATA/PropList.txt # PropList-5.1.0.txt
# Date: 2008-03-20, 17:55:27 GMT [MD]
0020 ; White_Space # Zs SPACE
00A0 ; White_Space # Zs NO-BREAK SPACE
1680 ; White_Space # Zs OGHAM SPACE MARK
180E ; White_Space # Zs MONGOLIAN VOWEL SEPARATOR
2000..200A ; White_Space # Zs [11] EN QUAD..HAIR SPACE
202F ; White_Space # Zs NARROW NO-BREAK SPACE
205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE
3000 ; White_Space # Zs IDEOGRAPHIC SPACE
Reference:
http://en.wikipedia.org/wiki/Space_(punctuation)#Table_of_spaces