From fc104c95bde2db0c6e266e76205a870be0e221c3 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Sat, 30 Mar 2013 14:48:22 -0400 Subject: =?UTF-8?q?Issue=20#1035292=20by=20D=C3=A9sir=C3=A9,=20vijaycs85,?= =?UTF-8?q?=20wizonesolutions,=20oriol=5Fe9g,=20ACF,=20achton,=20darkadept?= =?UTF-8?q?:=20Fixed=20Dynamic=20tokens=20can't=20have=20spaces.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/token.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes') 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); -- cgit v1.2.3