# Tooltip em itens do menu suspenso de categorias contém HTML como texto

**URL:** https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908
**Category:** Bug
**Created:** [13 Novembro , 2018 05:59 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908 "2018-11-13T05:59:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![CaZsm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cazsm/32/164906_2.png) [@CaZsm](https://meta.discourse.org/u/CaZsm)
#### Post date: [13 Novembro , 2018 05:59 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908/1 "2018-11-13T05:59:38Z")

</div>

In the “All categories” dropdown input, if you hover your mouse over any category title it will display a tooltip containing the category’s description.

However, if you hover your mouse over the counter beside the category title, the tooltip will also contain any HTML in the description + the ellipsis HTML entity.

This can be reproduced on this forum, the [Twitter community forum](https://twittercommunity.com/), and other forums.

The contents of this tooltip come from the title attribute on the li tag in the dropdown.

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/8/3821ebd1ac41af5eb0f4046bfc40b047e4361639.png)

 ![chrome_2018-11-12_23-44-20](https://global.discourse-cdn.com/meta/original/3X/5/2/52c3b431ce057c131f3bb7cfa7b2ab536870665c.png)

 ![chrome_2018-11-12_23-44-28](https://global.discourse-cdn.com/meta/original/3X/e/1/e1c38c72a8a69b1068a8cc7cd44629e1cd730de3.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [13 Novembro , 2018 06:00 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908/2 "2018-11-13T06:00:57Z")

</div>

Probably an oversight, good catch. Could be another starter task for someone.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [13 Novembro , 2018 08:40 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908/3 "2018-11-13T08:40:56Z")

</div>

Yes this is mostly due to how categorybadge works, we should really improve this. It has its own logic which comes clashing with any parent component which wants to show a title too.

I feel like category badge should be able to express a structure without markup.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [13 Novembro , 2018 12:36 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908/4 "2018-11-13T12:36:04Z")

</div>

Will be fixed by:

[https://github.com/discourse/discourse/commit/c1e82e7442ee129bb2bab96c4bd20c2c3206c9c1](https://github.com/discourse/discourse/commit/c1e82e7442ee129bb2bab96c4bd20c2c3206c9c1)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [13 Novembro , 2018 12:36 UTC](https://meta.discourse.org/t/tooltip-on-items-in-categories-dropdown-contains-html-as-text/101908/5 "2018-11-13T12:36:09Z")

</div>


