#9019 closed bug (notabug)
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.
Change History (6)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Hi joshfreeman,
Thanks for taking the time to contribute to the jQuery UI project. Putting HTML within the title
attribute 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 content
option - http://api.jqueryui.com/tooltip/#option-content.
comment:5 Changed 10 years ago by
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
comment:6 Changed 10 years ago by
Replying to 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