@@ -146,7 +146,10 @@ test('otherMonths', function() {
146
146
var inp = TestHelpers . datepicker . init ( '#inp' ) ,
147
147
pop = $ ( '#ui-datepicker-div' ) ;
148
148
inp . val ( '06/01/2009' ) . datepicker ( 'show' ) ;
149
- equal ( pop . find ( 'tbody' ) . text ( ) , '\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0' ,
149
+ equal ( pop . find ( 'tbody' ) . text ( ) ,
150
+ // support: IE <9, jQuery <1.8
151
+ // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways
152
+ $ ( "<span>\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0</span>" ) . text ( ) ,
150
153
'Other months - none' ) ;
151
154
ok ( pop . find ( 'td:last *' ) . length === 0 , 'Other months - no content' ) ;
152
155
inp . datepicker ( 'hide' ) . datepicker ( 'option' , 'showOtherMonths' , true ) . datepicker ( 'show' ) ;
@@ -158,7 +161,10 @@ test('otherMonths', function() {
158
161
'Other months - select' ) ;
159
162
ok ( pop . find ( 'td:last a' ) . length === 1 , 'Other months - link content' ) ;
160
163
inp . datepicker ( 'hide' ) . datepicker ( 'option' , 'showOtherMonths' , false ) . datepicker ( 'show' ) ;
161
- equal ( pop . find ( 'tbody' ) . text ( ) , '\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0' ,
164
+ equal ( pop . find ( 'tbody' ) . text ( ) ,
165
+ // support: IE <9, jQuery <1.8
166
+ // In IE7/8 with jQuery <1.8, encoded spaces behave in strange ways
167
+ $ ( "<span>\u00a0123456789101112131415161718192021222324252627282930\u00a0\u00a0\u00a0\u00a0</span>" ) . text ( ) ,
162
168
'Other months - none' ) ;
163
169
ok ( pop . find ( 'td:last *' ) . length === 0 , 'Other months - no content' ) ;
164
170
} ) ;
0 commit comments