File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -352,14 +352,21 @@ $.widget("ui.dialog", {
352
352
uiDialogTitle = $ ( "<span>" )
353
353
. uniqueId ( )
354
354
. addClass ( "ui-dialog-title" )
355
- . html ( this . options . title || " " )
356
355
. prependTo ( this . uiDialogTitlebar ) ;
356
+ this . _title ( uiDialogTitle ) ;
357
357
358
358
this . uiDialog . attr ( {
359
359
"aria-labelledby" : uiDialogTitle . attr ( "id" )
360
360
} ) ;
361
361
} ,
362
362
363
+ _title : function ( title ) {
364
+ if ( ! this . options . title ) {
365
+ title . html ( " " ) ;
366
+ }
367
+ title . text ( this . options . title ) ;
368
+ } ,
369
+
363
370
_createButtonPane : function ( ) {
364
371
var uiDialogButtonPane = ( this . uiDialogButtonPane = $ ( "<div>" ) )
365
372
. addClass ( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ) ;
@@ -600,9 +607,7 @@ $.widget("ui.dialog", {
600
607
}
601
608
602
609
if ( key === "title" ) {
603
- // convert whatever was passed in to a string, for html() to not throw up
604
- $ ( ".ui-dialog-title" , this . uiDialogTitlebar )
605
- . html ( "" + ( value || " " ) ) ;
610
+ this . _title ( this . uiDialogTitlebar . find ( ".ui-dialog-title" ) ) ;
606
611
}
607
612
} ,
608
613
You can’t perform that action at this time.
0 commit comments