diff options
Diffstat (limited to 'includes/token.inc')
-rw-r--r-- | includes/token.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/token.inc b/includes/token.inc index 402aeae01..5e9ece85d 100644 --- a/includes/token.inc +++ b/includes/token.inc @@ -113,13 +113,13 @@ function token_replace($text, array $data = array(), array $options = array()) { */ function token_scan($text) { // Matches tokens with the following pattern: [$type:$name] - // $type and $name may not contain [ ] or whitespace characters. - // $type may not contain : characters, but $name may. + // $type and $name may not contain [ ] characters. + // $type may not contain : or whitespace characters, but $name may. preg_match_all('/ \[ # [ - pattern start ([^\s\[\]:]*) # match $type not containing whitespace : [ or ] : # : - separator - ([^\s\[\]]*) # match $name not containing whitespace [ or ] + ([^\[\]]*) # match $name not containing [ or ] \] # ] - pattern end /x', $text, $matches); |