-
-
Save jzaefferer/f945add6e6d32935d906 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js | |
index b998c25..271d64e 100644 | |
--- a/ui/jquery.ui.dialog.js | |
+++ b/ui/jquery.ui.dialog.js | |
@@ -347,14 +347,21 @@ $.widget("ui.dialog", { | |
uiDialogTitle = $( "<span>" ) | |
.uniqueId() | |
.addClass( "ui-dialog-title" ) | |
- .html( this.options.title || " " ) | |
.prependTo( this.uiDialogTitlebar ); | |
+ this._title( uiDialogTitle ); | |
this.uiDialog.attr({ | |
"aria-labelledby": uiDialogTitle.attr( "id" ) | |
}); | |
}, | |
+ _title: function( title ) { | |
+ if ( !this.options.title ) { | |
+ title.html( " " ); | |
+ } | |
+ title.text( this.options.title ); | |
+ }, | |
+ | |
_createButtonPane: function() { | |
var uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) ) | |
.addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); | |
@@ -612,9 +619,7 @@ $.widget("ui.dialog", { | |
} | |
if ( key === "title" ) { | |
- // convert whatever was passed in to a string, for html() to not throw up | |
- $( ".ui-dialog-title", this.uiDialogTitlebar ) | |
- .html( "" + ( value || " " ) ); | |
+ this._title( $( ".ui-dialog-title", this.uiDialogTitlebar ) ); | |
} | |
}, |
On line 35, use .find()
instead of passing a context. Otherwise, this looks good.
hi, i found this page by http://stackoverflow.com/questions/21830980/vulnerable-javascript-library-jquery-ui-1-8-16-custom-min-js. I have a similar problem with jquery-ui-1.8.14.js when i was using Acunetix scan. I will be grateful if you can help me out here, maybe a patch file? thank you in advance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
_setOption
used to pass along itsvalue
argument. That's not necessary any more, as the option is updated before calling_title
. Leftover from previous refactorings.