Term descriptions are now given in the title attribute of term links in node displays, so that, on mouse over, the descriptions appear as tooltips. However, this use of the descriptions is inappropriate if the description is long (the tooltip popup is huge in some browsers, and there is a lot of extra text being downloaded), and causes XHTML errors if the description contains any tags (which can't be included within the title attribute).
This issue is reported in the post
http://drupal.org/node/9491. It will be a particular issue for users who use the taxonomy_context.module, which provides support for displaying extended descriptions (equivalent to the body of a node).
Options for solving this might be:
- Remove term description from title attribute.
- Strip tags from term description. This would solve the error, though not the problem of long descriptions.
- Introduce a new field to allow short descriptions (for uses like the title attribute of links) as well as longer ones.
- Introduce a teaser delimiter in the term description, parallel to a node body, and probably an optional parameter in the _get_teaser() function for stripping tags, so that a short and optionally tagless description can be fetched for uses like the link popups and a longer, optionally HTML one for other uses.
Thoughts on which of these would work best?
Comments
Comment #1
nedjoThis is (mostly) a duplicate of http://drupal.org/node/7468, so I've moved the comments there.