Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2007 at 19:40 UTC
Updated:
22 Jul 2012 at 08:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
Steven commentedRight. The <head> title cannot contain HTML, but must be escaped properly. The name and slogan are plain-text and should be output as such. We already do this for RSS feeds.
However, chameleon should be updated as well.
Comment #2
cliff_dugal commentedI suppose I might as well mention that this problem still occurs in Drupal 6.1. And, I might as well also include my patch that works for me.
Comment #3
johnalbinConfirmed that the head title doesn’t get any html entity encoding.
Here’s the patches that include Chameleon.
Comment #4
johnalbinTo get some eyeballs.
Comment #5
c960657 commentedWith this patch, node titles get double-encoded. E.g. if I create a new content node with the title "Me & you", the page title reads "Me & you | Mysite".
The string returned by drupal_get_title() is an HTML encoded string. The node title is check_plain'ed in node_page_view() before being set with drupal_set_title().
I suggest you update the documentation for drupal_get_title() and drupal_set_title() to mention that the title is HTML encoded text.
Comment #6
c960657 commentedMore or less a duplicate of #242873: make drupal_set_title() use check_plain() by default. that has a patch as well as a test case.