diff --git a/includes/token.inc b/includes/token.inc
index 5e9ece8..1c5140e 100644
--- a/includes/token.inc
+++ b/includes/token.inc
@@ -99,7 +99,9 @@ function token_replace($text, array $data = array(), array $options = array()) {
   $tokens = array_keys($replacements);
   $values = array_values($replacements);
 
-  return str_replace($tokens, $values, $text);
+  // Call this function with the replaced text. This allows the use of nested
+  // tokens.
+  return token_replace(str_replace($tokens, $values, $text), $data, $options);
 }
 
 /**
