--- pathauto.module.old	2010-01-22 11:14:23.000000000 +0100
+++ pathauto.module	2010-01-22 11:11:17.000000000 +0100
@@ -132,11 +132,11 @@ function pathauto_token_values($type, $o
             $catpath_raw = '';
             foreach ($parents as $parent) {
               // Replace any / characters in individual terms which might create confusing URLs
-              $catpath = pathauto_cleanstring(check_plain(preg_replace('/\//', '', $parent->name))) .'/'. $catpath;
-              $catpath_raw = pathauto_cleanstring(preg_replace('/\//', '', $parent->name)) .'/'. $catpath_raw;
+              $catpath = pathauto_cleanstring(check_plain(str_replace('/', '', $parent->name))) .'/'. $catpath;
+              $catpath_raw = pathauto_cleanstring(str_replace('/', '', $parent->name)) .'/'. $catpath_raw;
             }
-            $values[$label .'path'] = $catpath .'/'. check_plain($category->name);
-            $values[$label .'path-raw'] = $catpath_raw .'/'. $category->name;
+            $values[$label .'path'] = $catpath .'/'. check_plain(str_replace('/', '', $category->name));
+            $values[$label .'path-raw'] = $catpath_raw .'/'. str_replace('/', '', $category->name);
             $values[$label .'alias'] = drupal_get_path_alias('taxonomy/term/'. $category->tid);
             if (!strncasecmp($values[$label .'alias'], 'taxonomy', 8)) {
               $values[$label .'alias'] = check_plain($category->name);
