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;

http://drupal.org/node/150297

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

fago’s picture

what was your autogenerated title snippet? have you used the token module?

bluesquare’s picture

Hi,

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.

fago’s picture

Title: Apostrophe Appearing as HTML Code in Node: Title » support the referenced node title as raw text
Project: Automatic Nodetitles » Token
Version: 5.x-1.0 » 5.x-1.7
Category: bug » feature
Status: Needs review » Active

the 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.

greggles’s picture

Title: support the referenced node title as raw text » allow option forraw text (i.e. no check_plain)

changing title since this is needed not just for referenced nodes, but a lot of situations.

greggles’s picture

Status: Active » Fixed

This 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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