Search and Top Navigation
#9019 closed bug (notabug)
Opened January 27, 2013 07:09PM UTC
Closed January 27, 2013 07:21PM UTC
Last modified March 17, 2013 03:42PM UTC
Tooltip Title and HTML
Reported by: | joshfreeman | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.tooltip | Version: | 1.10.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hello,
It seems in the new JQueryUI update it is no longer possible to use html inside the title tag to format the tooltip.
Here is a demo using version 1.9.2
http://jsbin.com/itapis/1/edit
As you can see the tooltip is bolded.
Here is a demo using version 1.10.0
http://jsbin.com/itapis/2/edit
The html is outputted rather than formatted.
This might not be a bug and intended but I could not find a way to get html formatted.
Attachments (0)
Change History (6)
Changed January 27, 2013 07:12PM UTC by comment:1
Changed January 27, 2013 07:21PM UTC by comment:2
resolution: | → notabug |
---|---|
status: | new → closed |
Hi joshfreeman,
Thanks for taking the time to contribute to the jQuery UI project. Putting HTML within the
titleattribute is not valid HTML and we are now escaping it to prevent XSS vulnerabilities (see #8861).
If you need HTML in your tooltips use the
contentoption - http://api.jqueryui.com/tooltip/#option-content.
Changed March 17, 2013 02:52PM UTC by comment:5
If you need HTML in your tooltips use the content option - http://api.jqueryui.com/tooltip/#option-content.
CAN YOU PLEASE PROVIDE AN EXAMPLE ... IF I GENERATED THE TOOLTIPS, HOW DO I ALLOW IT TO NOW RENDER HTML INSIDE?
content: $(this).attr('title'), // this still doesn't render the HTML
Changed March 17, 2013 03:42PM UTC by comment:6
Replying to [comment:5 mshaffer]:
If you need HTML in your tooltips use the content option - http://api.jqueryui.com/tooltip/#option-content. ================= CAN YOU PLEASE PROVIDE AN EXAMPLE ... IF I GENERATED THE TOOLTIPS, HOW DO I ALLOW IT TO NOW RENDER HTML INSIDE? content: $(this).attr('title'), this still doesn't render the HTML
Here's one: http:jsfiddle.net/tj_vantoll/9nfPU/. If you need further help please use the forums or Stack Overflow.
in the "2" edit the < and > got entity formatted, here is an example using correct formatting:
http://jsbin.com/itapis/6/edit