"\\u00a0": "\u00a0",
"\\u1680": "\u1680"
},
- html = "";
+ html = "",
+ runicode = /^\\u/;
jQuery.each( spaces, function( key, obj ) {
var value = obj.html || obj;
html += "<option value='attr" + value + "'></option>";
$select.html( html );
$select.val( "text" );
- assert.equal( $select.val(), "text", "Value with space character at beginning or end is stripped (" + key + ") selected (text)" );
- if ( /^\\u/.test( key ) ) {
+ // IE6-8 doesn't trim the option values
+ if ( runicode.test( key ) && /msie [678]\.0/i.test( window.navigator.userAgent ) ) {
+ assert.ok( true, "IE6-8 doesn't trim the option values" );
+ } else {
+ assert.equal( $select.val(), "text", "Value with space character at beginning or end is stripped (" + key + ") selected (text)" );
+ }
+
+ if ( runicode.test( key ) ) {
$select.val( "te" + val + "xt" );
assert.equal( $select.val(), "te" + val + "xt", "Value with non-space whitespace character (" + key + ") in the middle selected (text)" );
} else {