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", {
352352 uiDialogTitle = $ ( "<span>" )
353353 . uniqueId ( )
354354 . addClass ( "ui-dialog-title" )
355- . html ( this . options . title || " " )
356355 . prependTo ( this . uiDialogTitlebar ) ;
356+ this . _title ( uiDialogTitle ) ;
357357
358358 this . uiDialog . attr ( {
359359 "aria-labelledby" : uiDialogTitle . attr ( "id" )
360360 } ) ;
361361 } ,
362362
363+ _title : function ( title ) {
364+ if ( ! this . options . title ) {
365+ title . html ( " " ) ;
366+ }
367+ title . text ( this . options . title ) ;
368+ } ,
369+
363370 _createButtonPane : function ( ) {
364371 var uiDialogButtonPane = ( this . uiDialogButtonPane = $ ( "<div>" ) )
365372 . addClass ( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ) ;
@@ -600,9 +607,7 @@ $.widget("ui.dialog", {
600607 }
601608
602609 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" ) ) ;
606611 }
607612 } ,
608613
You can’t perform that action at this time.
0 commit comments