Hi,

I have a problem when I use this character in a taxonomy term : '

This character, when I put the taxonomy term token in the node title is translated by '

For example, the taxonomy term L'auberge is translated by L'auberge in my node title.

I don't have problem with others stpecial characters, and I test all available token (formated, raw...).

Can you help me ?

Comments

Please, no idea ?

Status:Active» Postponed (maintainer needs more info)

For me both characters look equal?

I have problems mit the "&" chars in taxonomy terms + autonodetitle. It will display a ""&"

Can you look into it?

Title:Stange translation of a spacial character in the title !Strange translation of a spacial character in the title
Status:Postponed (maintainer needs more info)» Active

I guess the OP meant the character is replaced by an HTML entity. As he wrote the code without escaping the HTML entity, it was shown from the input format as normal character.

Isn't this caused by the tokens that are passed to check_plain()?

Oh sorry, "&" appears as &

How can i check this, kiam?

Category:bug» support
Status:Active» Fixed

As noted in the description text, you should use raw tokens. If the token is raw, the characters are displayed correctly (= check_plained() once).

Status:Fixed» Closed (fixed)

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

Status:Closed (fixed)» Active

reopening it.
What if there are no -raw values available, like for example tokens coming from locations? Is this tean a token issue or a locations issue?

Status:Active» Closed (fixed)

Is this tean a token issue or a locations issue?

It is an issue of the module that provide the extra tokens without to provide a raw version.

Title:Strange translation of a spacial character in the titleStrange translation of a special character in the title
Version:6.x-1.2» master
Status:Closed (fixed)» Active

I have the same problem as #3, with a simple PlainText field in Drupal 7. Only "&" and "'" give a problem, all other accents like "ø" are fine. Since it concerns a core field type, should I request a raw-token over there?

Version:master» 7.x-1.x-dev

wrong version.

Status:Active» Closed (won't fix)

For future reference, I have solved it like this:
My field 'field_name' = 'foo&bar'.
Using token [node:field-name], the result is 'foo&ampbar'. (a straight text field does not have alternative tokens.)
The correct value appears when setting
- 'Evaluate PHP in pattern.' = Yes
- 'Pattern for the title' =

<?php
return $node->field_name[$node->language][0]['value'];
?>

#12 not working for me. The ' and & still show as &#039; and &amp.
I'm using a clean install of Drupal 7.8
Can anyone verify this? Thanks

By the way, 'raw' tokens don't exist any more in the latest Token module for Drupal 7, so that's not a solution.
Hope this issue gets resolved soon, makes this module useless for me.

Drupal 7.8
Automatic Nodetitles 7.x-1.0
Token 7.x-1.0-beta6

I was having this same problem on a plain textfield value with names like O'Brien
They were auto-titling as O&#039;Brien

I tried #12 and it worked for me.

Status:Closed (won't fix)» Active

#12 is not so good. For reference fields for instance, it needs a lot of PHP code to check for array index existence, to load referenced node to get title,... As there is no raw tokens in D7, it makes tokens unusable for non-english languages, which makes the module pretty useless for people with no PHP skills. I don't really know if this is fixable, and if it should be fixed in Token or in this module, but I reopen this to get at least an answer.

Hi All,
Need help. Where and how to implement the solution provide at #12?
OR some alternative for references module

Thanks in advanced for your help.

Status:Active» Needs review
StatusFileSize
new1.05 KB

I got this ”fixed” by using the callback functionality of token_replace() to clean the entities, as suggested on token_replace() API entry (”For example, a module using tokens in a text-only email might provide a callback to strip HTML entities from token values before they are inserted into the final text.”). Patch attached, hope it works for others too.

#12 worked for me with apostrophes and ampersand characters

Thanks!

The patch in #18 does not seem to work for ampersands or apostrophes for me.

StatusFileSize
new1.19 KB

the patch in #17 didnt work for me, here is a revision of that patch that did resolve the issue for me

Status:Needs review» Reviewed & tested by the community
StatusFileSize
new1.19 KB

This patch works great for me, re-roll only removes whitespace errors.

My use case was this:
1) I had some taxonomy terms with apostrophes and ampersands in them.
2) I had set up a content type that used the taxonomy term name in the node title.

Before the patch, the ampersands and apostrophes were converted to HTML entities when creating node titles.
Now, after this patch, the node titles are plain text, as expected.

Thanks @cangeceiro and @ZeiP

Category:support» bug

Oh, I also think this was a bug in the original design.

Patch in #21 works for me.

I had problem applying it. The second part (hunk) of the patch kept failing. I removed it and was able to apply patch (hunk #1). I then manually applied the second part of the patch (one line). Node title was showing a &#039;. After applying patch, it is now replaced by a proper apostrophe. Thanks!

Status:Reviewed & tested by the community» Needs review

Patch did not work for me. It suddenly throws the following error (which populates the title field):

( ! ) Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/ttm/sites/all/modules/contrib/auto_nodetitle/auto_nodetitle.module(221) : eval()'d code on line 3Call Stack#TimeMemoryFunctionLocation10.0001732496{main}( )../index.php:02

It might be my code. I'm staring at it, but am getting googly eyes at this point:

<?php
  $subject
= '[node:field_lecture_subject]';
 
//$subject = $node->field_lecture_subject[$node->language][0]['value'];
 
$number  = 'missing-lecture-number'; // set a default
 
$number  = '[node:field_lecture_number]';
  if(empty(
$subject)) {
    return(
"lecture #" . $number );
  }
  else {
    return(
$subject);
  }
?>

jenlampton — your patch worked for me; thank you!

The patch in #21 resolves the problem, but the file paths in the patch are relative to a Drupal root and not the module dir. Attached patch fixes the file paths only so I'm flipping it to RTBC.

Status:Needs review» Reviewed & tested by the community

Argh, bump status.

Just for good measure: I ran the patch in #26 against 7.x-1.0 (not the dev version) and can confirm that it solved the apostrophe problem.

The patch in #26 failed when applying to 7.x-1.x HEAD. I've rerolled it and given ZeiP attribution since he was the first one to post the original patch. I'll leave it at RTBC since it's just a reroll, and it applies cleanly now to 7.x-1.x:

vm-mbp:tmp vincentmassaro$ git clone --branch 7.x-1.x http://git.drupal.org/project/auto_nodetitle.git
Cloning into 'auto_nodetitle'...
remote: Counting objects: 287, done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 287 (delta 165), reused 223 (delta 130)
Receiving objects: 100% (287/287), 58.65 KiB | 0 bytes/s, done.
Resolving deltas: 100% (165/165), done.
Checking connectivity... done
vm-mbp:tmp vincentmassaro$ cd auto_nodetitle
vm-mbp:auto_nodetitle vincentmassaro$ git am ~/Desktop/auto_nodetitle-dont_double_escape_titles-565922-29.patch
Applying: Decode entities (patch from https://drupal.org/node/565922#comment-7792773)

Issue summary:View changes

Patch in #29 worked for me.