@@ -146,7 +146,10 @@ test('otherMonths', function() {
146146 var inp = TestHelpers . datepicker . init ( '#inp' ) ,
147147 pop = $ ( '#ui-datepicker-div' ) ;
148148 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 ( ) ,
150153 'Other months - none' ) ;
151154 ok ( pop . find ( 'td:last *' ) . length === 0 , 'Other months - no content' ) ;
152155 inp . datepicker ( 'hide' ) . datepicker ( 'option' , 'showOtherMonths' , true ) . datepicker ( 'show' ) ;
@@ -158,7 +161,10 @@ test('otherMonths', function() {
158161 'Other months - select' ) ;
159162 ok ( pop . find ( 'td:last a' ) . length === 1 , 'Other months - link content' ) ;
160163 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 ( ) ,
162168 'Other months - none' ) ;
163169 ok ( pop . find ( 'td:last *' ) . length === 0 , 'Other months - no content' ) ;
164170} ) ;
0 commit comments