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.

Comments

markhalliwell’s picture

Dave Reid - No, the tokens for fields shouldn't be filtering anything since we request the tokens with 'sanitize' => FALSE.

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

bdsl’s picture

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

dave reid’s picture

Status: Needs review » Fixed

So 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

Status: Fixed » Closed (fixed)

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