If a term is entered that contains an ampersand, when displayed using /taxonomy/term/%tid the term title displays the encoded version of the ampersand.

Steps to Replicate:

1) Enter Taxonomy Term with ampersand through admin interface. ie 'Cats & Dogs'. Assume TermID of 1.
2) Go to /taxonomy/term/1

Expected Behaviour:

3) Title of page will display "Cats & Dogs"

Actual Behaviour:

3) Title of Page displays "Cats & amp ; Dogs"

What I have

Windows 7
D7 Beta 3

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gopherspidey’s picture

If a term also has a single quote in it it displays '

gopherspidey’s picture

Version: 7.0-beta3 » 7.0
Status: Active » Needs review
FileSize
336 bytes

I think it might be a double check_plain. Try this patch out.

amateescu’s picture

Title: Ampersand in Taxonomy Term Title is displayed encoded » Special characters are encoded twice in taxonomy term title
Version: 7.0 » 7.x-dev
Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community
FileSize
506 bytes

I just closed two issues that were duplicates of this one so bumping to major.

Attached patch also adds a blank line between the @param section and @return directive.

Here is the corresponding function from node.module:

function node_page_title($node) {
  return $node->title;
}

so both #3 or #4 are RTBC!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

twirlingsky’s picture

Title: Special characters are encoded twice in taxonomy term title » Apostrophe's displaying html

This fixed ampersands but Apostrophe's are still showing up as html code (&#039). Titles in teaser format.

(Sorry, wanted to make a new issue.. and can't delete this comment....)

twirlingsky’s picture

Title: Apostrophe's displaying html » Special characters are encoded twice in taxonomy term title

Currently the taxonomy / teaser title is displaying as "Don't Tell Santa You're Jewish"

Should be" Don't Tell Santa You're Jewish"

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

clemens.tolboom’s picture

The workaround for this Apostrophe problem mentioned by @twirlingsky is to use the views taxanomy display.
(weird this is still in D7: I tried to find more references to this particular problem but failed.)

thinkyhead’s picture

Should this issue be re-opened? The problem still exists in Drupal 7.21.

ClaudeS-1’s picture

Still exists in Drupal 7.22, and not just in taxonomy views.

I have a view that shows the teaser for several pages, and one of the page titles has an apostrophe (single quote) that is rendering as & # 0 3 9 ; (spaced out so it doesn't render as an apostrophe here!)