Site slogan in <title> is not being encoded

expandonline - March 28, 2009 - 22:05
Project:Page Title
Version:6.x-2.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

My site slogan is 'Leaning & Development', however the & is not being being html encoded as &
Page titles with '&' in are correctly encoded.

#1

expandonline - March 28, 2009 - 22:06

First line should have read
'My site slogan is 'Leaning & Development', however the & is not being being html encoded as &amp;

#2

nicholasThompson - March 31, 2009 - 11:00
Version:6.x-2.0» 6.x-2.x-dev
Priority:normal» critical
Assigned to:Anonymous» nicholasThompson

I'll take a look - thanks.

#3

nicholasThompson - April 10, 2009 - 18:34
Version:6.x-2.x-dev» 5.x-2.x-dev
Status:active» patch (to be ported)

Fixed in commit http://drupal.org/cvs?commit=195366
Will be in DRUPAL-6--2-1

Fix needs porting...

#4

nicholasThompson - April 15, 2009 - 12:13
Status:patch (to be ported)» fixed

Fix is present in DRUPAL-5--2 and DRUPAL-6--2... Marking as fixed.

#5

System Message - April 29, 2009 - 12:20
Status:fixed» closed

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

#6

expandonline - June 18, 2009 - 14:05
Version:5.x-2.x-dev» 6.x-2.2
Priority:critical» normal
Assigned to:nicholasThompson» Anonymous
Status:closed» needs review

Not fully fixed - see patch attached

AttachmentSize
page_title-fix_html_in_slogan.patch 367 bytes

#7

expandonline - June 18, 2009 - 14:09

Sorry, error in patch file (and can't edit attachments) - this one should be correct

AttachmentSize
page_title-6.x-2.2-fix_html_in_slogan.patch 379 bytes

#8

nicholasThompson - June 18, 2009 - 14:20

I believe that was removed as it has a tendency to double-encode...

#9

expandonline - June 18, 2009 - 19:49

Ah yes - it does double encode the node title, but require this patch to get the site slogan (as defined in the original issue at the top) to encode properly.

#10

expandonline - June 21, 2009 - 19:43

It's a hacked solution, but I can get the script to encode my <title>'s properly by using this as the return at the end of page_title_page_get_title():

447: return check_plain(html_entity_decode(strip_tags($title)));

Peter

 
 

Drupal is a registered trademark of Dries Buytaert.