diff options
author | David Rothstein <drothstein@gmail.com> | 2013-03-30 14:48:22 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2013-03-30 14:48:22 -0400 |
commit | fc104c95bde2db0c6e266e76205a870be0e221c3 (patch) | |
tree | 5dfc5473f817a33a02021e111b77510015d7dd64 /includes | |
parent | 1d378ff882353b32716837d3ff901305e0aa05a8 (diff) | |
download | brdo-fc104c95bde2db0c6e266e76205a870be0e221c3.tar.gz brdo-fc104c95bde2db0c6e266e76205a870be0e221c3.tar.bz2 |
Issue #1035292 by Désiré, vijaycs85, wizonesolutions, oriol_e9g, ACF, achton, darkadept: Fixed Dynamic tokens can't have spaces.
Diffstat (limited to 'includes')
-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); |