Closed (fixed)
Project:
Real Name
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2012 at 20:43 UTC
Updated:
1 Mar 2012 at 18:00 UTC
RealName uses token_replace, based on the settings you provide in the configuration. By default, it uses the raw username, however if you have custom fields in the user profile and set the token replacement pattern to say: [user:first_name] [user:last_name], then it seems to be that the input is filtered after the token replacement.
This patch reverts any HTML special character encodings.
| Comment | File | Size | Author |
|---|---|---|---|
| realname-special-characters-616134-15.patch | 925 bytes | markhalliwell |
Comments
Comment #1
markhalliwell"Shouldn't be" being the operative keywords. However the tokens return a sanitized string, regardless of this option provided. From trying to find where the field tokens are provided, it seems that there is a huge topic already out there on this: #691078: Field tokens. While there hasn't been anything committed to the Token project regarding field tokens in a while, it seems to just use drupal_render() when outputting the data.
This is a simple fix until field tokens have been fixed and committed in a stable Token project release.
Comment #2
bdsl commentedSubscribe. Applied the patch and it seems to work fine, although I note that as the real names get saved to the database its necessary to change them to trigger the code in the patch to get run. I added am extra letter on to the pattern, saved, removed the letter and saved again.
Comment #3
dave reidSo the irony is I already had a decode_entities() call committed to my local version of Realname and just hadn't pushed it yet, so I finally did today which should resolve this issue.
http://drupalcode.org/project/realname.git/commit/b52ca8a