diff --git a/modules/system/system.test b/modules/system/system.test
index 511c9c28e63db55818347099a42fefa0f3fad763..85ac616099729b5dac6a27904defd273b5f677fb 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 f57daf2da20f786f0bdf1e2ba110a3375b44a519..6ce9971b1cc4dd3092d511dbb7f57308cfaad408 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':