Closed (fixed)
Project:
Token
Version:
5.x-1.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2007 at 15:10 UTC
Updated:
12 Nov 2007 at 22:41 UTC
Hi,
I had experienced a problem with apostrophe's being displayed as # & 039; (no spaces) in node titles. I had a similar problem with cck.nodereference here;
I checked the diff;
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/cck/noderefer...
and saw that the addition of html_entity_decode() to strip_tags() fixed the problem.
I tried the same in auto_nodetitle.module, line 92;
$output = preg_replace('/[\t\n\r\0\x0B]/', '', html_entity_decode(strip_tags($output), ENT_QUOTES));
and node titles are now being created with apostrophes in place.
Could you please review this change and see whether it's going to work for all cases?
Thanks,
BlueSquare.
Comments
Comment #1
fagowhat was your autogenerated title snippet? have you used the token module?
Comment #2
bluesquare commentedHi,
The autogenerated title snippet (I assume you mean the title the node was assigned);
"Under 9's (Tackers) - Kookaburras: Round 3"
which is generated from the followings tokens in the auto nodetitles section of this content type.
[field_team-title]: Round [field_round-formatted]
(field_team-title = Referenced node title, field_round-formatted = Formatted number value)
Running Token ver 5.x-1.7.
Thanks,
BlueSquare.
Comment #3
fagothe problem is, that the title field is already check_plain()ed.
You need to use raw-text replacements. unfortunately the token module misses a raw text replacement for this.
Comment #4
greggleschanging title since this is needed not just for referenced nodes, but a lot of situations.
Comment #5
gregglesThis was the motivation for all the security changes in the 5.x-1.9 version of token, so hopefully it is fixed. If not, please let me know.
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.