--- nodegoto.patched_token	2007-05-31 01:24:57.000000000 +0000
+++ nodegoto.module	2007-05-31 04:44:41.000000000 +0000
@@ -31,6 +31,8 @@
 	$nodetype=$node->type;
 	$nid=$node->nid;
 	$nodeto = module_exists('token') ? token_replace(variable_get('nodegoto_'.$op.'_'.$nodetype,''), 'node', $node) : variable_get('nodegoto_'.$op.'_'.$nodetype,'');
+	# Parse the supplied url into a base and parameters
+	list($nodeto, $parms) = explode( "?", $nodeto);
 	
 	if (variable_get('nodegoto_camefrom',0)==1){
   $camefrom='camefrom='.urlencode('node/'.$nid);  
@@ -45,13 +47,13 @@
            } }                        
   else{
   if ( $op == 'insert' && $nodeto!=''){             
-        drupal_goto($nodeto);
+        drupal_goto($nodeto, $parms);
            }
      if ( $op == 'update' && $nodeto!=''){             
-        drupal_goto($nodeto);
+        drupal_goto($nodeto, $parms);
            }
      if ( $op == 'delete' && $nodeto!=''){             
-        drupal_goto($nodeto);
+        drupal_goto($nodeto, $parms);
            }
   }
   	
@@ -174,7 +176,7 @@
       
   	$form['nodescamefrom']['nodegoto_camefrom'] = array(
       '#type' => 'checkbox',
-      '#title' => "Check to append the information from witch node it came.",
+      '#title' => "Check to append the information from which node it came.",
       '#default_value' => variable_get('nodegoto_camefrom',0),
       '#return_value' => 1,
      );  
