summaryrefslogtreecommitdiff
path: root/modules/node/node.tokens.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-09-11 18:43:22 -0400
committerDries Buytaert <dries@buytaert.net>2011-09-11 18:43:22 -0400
commitdcea6ffb1bacaa050f0d2a0d2656c075c8fc94ea (patch)
tree29dd25de82dd8240bb49fa8eb86da2cb17f377b0 /modules/node/node.tokens.inc
parent5e1df952ebbc7f49d6c6ede1fb15e338fd6d29b3 (diff)
downloadbrdo-dcea6ffb1bacaa050f0d2a0d2656c075c8fc94ea.tar.gz
brdo-dcea6ffb1bacaa050f0d2a0d2656c075c8fc94ea.tar.bz2
- Patch #1185842 by Dave Reid: the [node:author] token does not use format_username().
Diffstat (limited to 'modules/node/node.tokens.inc')
-rw-r--r--modules/node/node.tokens.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/node/node.tokens.inc b/modules/node/node.tokens.inc
index 80dbda517..b6bafc639 100644
--- a/modules/node/node.tokens.inc
+++ b/modules/node/node.tokens.inc
@@ -157,8 +157,9 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
// Default values for the chained tokens handled below.
case 'author':
- $name = ($node->uid == 0) ? variable_get('anonymous', t('Anonymous')) : $node->name;
- $replacements[$original] = $sanitize ? filter_xss($name) : $name;
+ $account = user_load($node->uid);
+ $name = format_username($account);
+ $replacements[$original] = $sanitize ? check_plain($name) : $name;
break;
case 'created':