summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-03-30 14:48:22 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-03-30 14:48:22 -0400
commitfc104c95bde2db0c6e266e76205a870be0e221c3 (patch)
tree5dfc5473f817a33a02021e111b77510015d7dd64 /includes
parent1d378ff882353b32716837d3ff901305e0aa05a8 (diff)
downloadbrdo-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.inc6
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);