aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-07-14 15:28:01 -0400
committerScott González <scott.gonzalez@gmail.com>2010-07-14 15:28:01 -0400
commit2c7a9e9ff3540365254ee1b9b3113e6c2ad9f5f3 (patch)
tree3702a357588228b4550b144d9841297277dd051c /ui
parentcdd6161419190e9d5a1e823f4910559dbab6de7d (diff)
downloadjquery-ui-2c7a9e9ff3540365254ee1b9b3113e6c2ad9f5f3.tar.gz
jquery-ui-2c7a9e9ff3540365254ee1b9b3113e6c2ad9f5f3.zip
Dialog: Verify that we get a string back from .attr( "title" ) before using the return value. Fixes #5742 - Form field with `name="title"` moved to title area.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 5fb5f1007..46f931669 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -49,6 +49,10 @@ $.widget("ui.dialog", {
},
_create: function() {
this.originalTitle = this.element.attr('title');
+ // #5742 - .attr() might return a DOMElement
+ if ( typeof this.originalTitle !== "string" ) {
+ this.originalTitle = "";
+ }
var self = this,
options = self.options,