Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | 973328-taxonomy_term_title.patch | 506 bytes | amateescu |
#2 | 973328-3.patch | 336 bytes | gopherspidey |
Comments
Comment #1
gopherspidey CreditAttribution: gopherspidey commentedIf a term also has a single quote in it it displays '
Comment #2
gopherspidey CreditAttribution: gopherspidey commentedI think it might be a double check_plain. Try this patch out.
Comment #3
amateescu CreditAttribution: amateescu commentedI 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:
so both #3 or #4 are RTBC!
Comment #4
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #5
twirlingsky CreditAttribution: twirlingsky commentedThis fixed ampersands but Apostrophe's are still showing up as html code ('). Titles in teaser format.
(Sorry, wanted to make a new issue.. and can't delete this comment....)
Comment #6
twirlingsky CreditAttribution: twirlingsky commentedCurrently the taxonomy / teaser title is displaying as "Don't Tell Santa You're Jewish"
Should be" Don't Tell Santa You're Jewish"
Comment #8
clemens.tolboomThe 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.)
Comment #9
thinkyhead CreditAttribution: thinkyhead commentedShould this issue be re-opened? The problem still exists in Drupal 7.21.
Comment #10
ClaudeS-1 CreditAttribution: ClaudeS-1 commentedStill 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!)