Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.87
diff -u -p -r1.87 node.pages.inc
--- modules/node/node.pages.inc	11 Oct 2009 03:07:18 -0000	1.87
+++ modules/node/node.pages.inc	14 Oct 2009 02:08:55 -0000
@@ -462,7 +462,7 @@ function node_delete_confirm($form, &$fo
 
   return confirm_form($form,
     t('Are you sure you want to delete %title?', array('%title' => $node->title[FIELD_LANGUAGE_NONE][0]['value'])),
-    isset($_GET['destination']) ? $_GET['destination'] : 'node/' . $node->nid,
+    'node/' . $node->nid,
     t('This action cannot be undone.'),
     t('Delete'),
     t('Cancel')
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.32
diff -u -p -r1.32 path.admin.inc
--- modules/path/path.admin.inc	10 Oct 2009 20:46:17 -0000	1.32
+++ modules/path/path.admin.inc	14 Oct 2009 02:05:28 -0000
@@ -186,7 +186,7 @@ function path_admin_delete_confirm($form
     $form['pid'] = array('#type' => 'value', '#value' => $pid);
     $output = confirm_form($form,
       t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
-      isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/search/path');
+      'admin/config/search/path');
   }
   return $output;
 }
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.810
diff -u -p -r1.810 system.module
--- modules/system/system.module	13 Oct 2009 21:34:15 -0000	1.810
+++ modules/system/system.module	14 Oct 2009 02:04:44 -0000
@@ -2400,14 +2400,17 @@ function _system_sort_requirements($a, $
 function confirm_form($form, $question, $path, $description = NULL, $yes = NULL, $no = NULL, $name = 'confirm') {
   $description = isset($description) ? $description : t('This action cannot be undone.');
 
-  // Prepare cancel link
-  $query = $fragment = NULL;
-  if (is_array($path)) {
-    $query = isset($path['query']) ? $path['query'] : NULL;
-    $fragment = isset($path['fragment']) ? $path['fragment'] : NULL;
-    $path = isset($path['path']) ? $path['path'] : NULL;
+  // Prepare cancel link.
+  if (isset($_GET['destination'])) {
+    $options = drupal_parse_url(urldecode($_GET['destination']));
   }
-  $cancel = l($no ? $no : t('Cancel'), $path, array('query' => $query, 'fragment' => $fragment));
+  elseif (is_array($path)) {
+    $options = $path;
+  }
+  else {
+    $options = array('path' => $path);
+  }
+  $cancel = l($no ? $no : t('Cancel'), $options['path'], $options);
 
   drupal_set_title($question, PASS_THROUGH);
 
