Closed (fixed)
Project:
Automatic Entity Label
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 May 2012 at 19:45 UTC
Updated:
24 May 2012 at 13:50 UTC
I am using Automatic Entity Label to create the Title field using two tokens for first and last name and then using the title field as Full Name. The problem I am running into is that when the last name has an apostrophe, the ' is converted to '
Example of my fields:
field_first_name: John
field_last_name: O'malley
Title (Full Name): John O & # 0 3 9 ; malley
Is there anything I can do to fix this?
Comments
Comment #1
courtvb commentedSorry, the apostrophe was converted & # 0 3 9 ; (no spaces) is what is shown in lieu of the apostrophe.
Comment #2
bforchhammer commentedThis is actually works as designed... kindof.
For field tokens, the token value is generated by rendering the field with the "token" view mode, i.e. with whichever formatter is set up on Node Type > Manage Display > Tokens. If you don't have the Tokens view mode configured, it will fall back to the Default view mode; which by default santitizes text field values, i.e. replaces things like hypens with
'.So in order to fix your labels: enable the tokens view mode and set the field formatter to Plain text.
Alternatively you could also use the field tokens provided by the entity tokens module, as they are not sanitized by default and show up correctly. I'd recommend the other way though, because the tokens list gets a bit confusing with duplicate field tokens. (To tell them apart: token module field tokens use underscores, like [node:field_name]; and entity token module uses hypens, like [node:field-name]).
Comment #3
courtvb commentedThanks Benedikt! I took your advice and enabled the tokens view mode and set the format to plain text. Really appreciate your help.
Court
Comment #4.0
(not verified) commentedtypo