Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7823 closed bug (notabug)

Dialog title as html not handled properly using option setter

Reported by: jvivs Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:

Description

affected versions: -jquery: 1.5.1 -jquery ui: 1.8.16

browser: chrome 14.0.835.163

OS: OSX 10.7.2

Reproducable by setting an existing dialog's title via the options setter. Ex:

<div class="dialog">Dialog? Yep!</div>

<script>
var dialog = $('.dialog').dialog();
dialog.dialog('option', 'title', $('<span style="color: red">I\'m a title and I\'m OK</span>'));
</script>

Results in the title being set to [Option option] when the jQuery object is converted to a string on line 595 of /jquery-ui/ui/jquery.ui.dialog.js as of a0856efef3c392d413aa6cd9bd084dc601a337c6.

see working demo of bug here: http://jsbin.com/irazil/edit#javascript,html

Change History (3)

comment:1 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

That's not HTML, that's an object.

comment:2 Changed 8 years ago by jvivs

hmm... yeah, i see. derp. string-building here we go!

comment:3 Changed 8 years ago by jvivs

pull request was here if you'd consider allowing the addition of jquery objects: https://github.com/jquery/jquery-ui/pull/507.

Note: See TracTickets for help on using tickets.