? 0-pathauto-bulk-update-bundles-D7.patch
? 1009116-node-to-content.patch
? 752034-pathauto-entity-form-D7.patch
? 781448-pathauto-remove-dupe-segments-D7.patch
? 834198-pathauto-speedup-cleanstring-D7.patch
? 863980-pathauto-forum-taxonomy-wedding.patch
? 867582-pathauto-stop-supporting-feeds-D7.patch
? 936222-pathauto-node-update-logic-D7.patch
? 955926-preview-node-empty-uri.patch
? 971552-pathauto-abstract-redirect.patch
? patches
? pathauto.temp.inc
? pathauto.tokens.inc
? subpathauto
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.95
diff -u -p -r1.95 pathauto.inc
--- pathauto.inc	11 Jan 2011 19:55:39 -0000	1.95
+++ pathauto.inc	13 Jan 2011 19:51:38 -0000
@@ -546,14 +546,28 @@ function _pathauto_verbose($message = NU
  *   An array of objects used to generate the replacements.
  * @param $options
  *   An array of options used to generate the replacements.
+ *
+ * @todo Convert this to use hook_tokens_alter()?
  */
 function pathauto_clean_token_values(&$replacements, $data = array(), $options = array()) {
   foreach ($replacements as $token => $value) {
     // Only clean non-path tokens.
-    if (!preg_match('/(path|alias|url|url-brief)\]$/', $token)) {
+    if (strpos($token, 'path') !== FALSE && is_array($value) && !empty($options['pathauto'])) {
+      // If the token name contains 'path', the token value is an array, and
+      // the 'pathauto' option was passed to token_get_values(), then the token
+      // should have each segment cleaned, and then glued back together to
+      // construct a value resembling an URL.
+      $segments = array_map('pathauto_cleanstring', $value);
+      $replacements[$token] = implode('/', $segments);
+    }
+    elseif (preg_match('/(path|alias|url|url-brief)(-raw)?$/', $token)) {
+      // Token name matches an URL-type name and should be left raw.
+      continue;
+    }
+    else {
+      // Token is not an URL, so it should have its value cleaned.
       $replacements[$token] = pathauto_cleanstring($value);
     }
-    // @todo Clean up 'tree-style' tokens that are not actually URLs.
   }
 }
 
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.169
diff -u -p -r1.169 pathauto.module
--- pathauto.module	13 Jan 2011 03:27:24 -0000	1.169
+++ pathauto.module	13 Jan 2011 19:51:38 -0000
@@ -290,6 +290,8 @@ function pathauto_node_presave($node) {
  * Implements hook_node_insert().
  */
 function pathauto_node_insert($node) {
+  // @todo Remove the next line when http://drupal.org/node/1025870 is fixed.
+  unset($node->uri);
   pathauto_node_update_alias($node, 'insert');
 }
 
Index: pathauto.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.test,v
retrieving revision 1.38
diff -u -p -r1.38 pathauto.test
--- pathauto.test	13 Jan 2011 03:27:24 -0000	1.38
+++ pathauto.test	13 Jan 2011 19:51:39 -0000
@@ -349,16 +349,20 @@ class PathautoFunctionalTestCase extends
    * Basic functional testing of Pathauto.
    */
   function testNodeEditing() {
-    // Create node for testing.
+    // Create node for testing by previewing and saving the node form.
     $random_title = $this->randomName(10);
     $title = ' Simpletest title ' . $random_title . ' [';
     $automatic_alias = 'content/simpletest-title-' . strtolower($random_title);
-    $node = $this->drupalCreateNode(array('title' => $title, 'type' => 'page'));
+    $this->drupalPost('node/add/page', array('title' => $title), 'Preview');
+    $this->drupalPost(NULL, array(), 'Save');
+
+    $node = $this->drupalGetNodeByTitle($title);
+    $this->assertEqual($this->getUrl(), url($automatic_alias, array('absolute' => TRUE)), 'Generated alias associated with the node.');
 
     // Look for alias generated in the form.
     $this->drupalGet('node/' . $node->nid . '/edit');
     $this->assertFieldChecked('edit-path-pathauto');
-    $this->assertFieldByName('path[alias]', $automatic_alias, 'Proper automated alias generated.');
+    $this->assertFieldByName('path[alias]', $automatic_alias, 'Generated alias visible in the path alias field.');
 
     // Check whether the alias actually works.
     $this->drupalGet($automatic_alias);
