Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
To reproduce;
1) create a text field on a node type
2) set the node type to use that field's token in an automatically generated title
3) create a node where that field's value is something similar to testin' is fun
4) see the node's title created as testin' is fun
Comments
Comment #1
Robin Monks CreditAttribution: Robin Monks commentedThis is a patch that has not been extensively tested for security and should not be used in situations where the users creating nodes are not trusted. No, it's not a proper git patch because I want you to think long and hard before applying it, so it's supposed to be hard.
Feel free to check into the security of this solution and roll a proper patch. At the very least I suspect a check_plain or xss check needs to happen, but I'm not currently willing to dig into node_save enough to figure out which combo.
/Robin
Comment #2
Andrew_Mallis CreditAttribution: Andrew_Mallis commentedsee https://drupal.org/node/565922#comment-4249920
Comment #3
micahw156Duplicate of #565922: Strange translation of a special character in the title
Comment #4
codesidekick CreditAttribution: codesidekick commentedI just ran into this problem when using node fields in the titles.
To avoid this happening (without patching or anything) use the field token rather then the value token.
eg use
[field-my-great-field]
instead of
[field_my_great_field]
Comment #5
afmdsouza CreditAttribution: afmdsouza commentedWorkaround provided at #4 works - thanks.
Comment #6
Obliveon CreditAttribution: Obliveon commented#4 worked for me but i had to install Entity Tokens... without it the field tokens don't show