diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-28 01:33:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-28 01:33:41 +0000 |
commit | d432737d8ed4f1a98a271e25e686c2085836e596 (patch) | |
tree | 1d7165d397ccf1bf26995400148a75da22192d6a /modules | |
parent | 7c95deecb15fdbaa07aba28eb1ddb94f74ee80fc (diff) | |
download | brdo-d432737d8ed4f1a98a271e25e686c2085836e596.tar.gz brdo-d432737d8ed4f1a98a271e25e686c2085836e596.tar.bz2 |
- Patch #931520 by David_Rothstein: [site:url-brief] token puts an unnecessary slash at the end.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.test | 2 | ||||
-rw-r--r-- | modules/system/system.tokens.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index 511c9c28e..85ac61609 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1578,7 +1578,7 @@ class TokenReplaceTestCase extends DrupalWebTestCase { $tests['[site:slogan]'] = check_plain(variable_get('site_slogan', '')); $tests['[site:mail]'] = 'simpletest@example.com'; $tests['[site:url]'] = url('<front>', $url_options); - $tests['[site:url-brief]'] = preg_replace('!^https?://!', '', url('<front>', $url_options)); + $tests['[site:url-brief]'] = preg_replace(array('!^https?://!', '!/$!'), '', url('<front>', $url_options)); $tests['[site:login-url]'] = url('user', $url_options); // Test to make sure that we generated something for each token. diff --git a/modules/system/system.tokens.inc b/modules/system/system.tokens.inc index f57daf2da..6ce9971b1 100644 --- a/modules/system/system.tokens.inc +++ b/modules/system/system.tokens.inc @@ -165,7 +165,7 @@ function system_tokens($type, $tokens, array $data = array(), array $options = a break; case 'url-brief': - $replacements[$original] = preg_replace('!^https?://!', '', url('<front>', $url_options)); + $replacements[$original] = preg_replace(array('!^https?://!', '!/$!'), '', url('<front>', $url_options)); break; case 'login-url': |