Tooltip on items in categories dropdown contains HTML as text

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, and other forums.

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

4 Likes

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

1 Like

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.

5 Likes

Will be fixed by:

https://github.com/discourse/discourse/commit/c1e82e7442ee129bb2bab96c4bd20c2c3206c9c1

5 Likes