Index: path_redirect.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/path_redirect/path_redirect.module,v
retrieving revision 1.3.2.6
diff -u -F^f -r1.3.2.6 path_redirect.module
--- path_redirect.module	2 May 2007 01:33:42 -0000	1.3.2.6
+++ path_redirect.module	5 Oct 2007 12:12:03 -0000
@@ -127,7 +127,8 @@ function path_redirect_admin($rid = FALS
     $fragment = $r->fragment ? "#$r->fragment" : '';
     $rows[] = array(
       $path,
-      $redirect.$query.$fragment, $types[$r->type]['title'],
+      check_url($redirect . $query . $fragment),
+      $types[$r->type]['title'],
       array('data' => l(t('test'), $r->path, array(), $r->query ? $r->query : NULL, $r->fragment ? $r->fragement : NULL)),
       array('data' => l(t('edit'), 'admin/build/path_redirect/edit/'. $r->rid)),
       array('data' => l(t('delete'), 'admin/build/path_redirect/edit/'. $r->rid .'/delete')),
@@ -177,7 +178,7 @@ function path_redirect_edit($edit = arra
     '#prefix' => '<div class="container-inline">',
     '#suffix' => '</div>',
     '#title' => t('To'),
-    '#description' => '<div style="display:block">'. t('Enter a Drupal path, path alias, or external URL to redirect to. Enter (optional) queries after "?" and (optional) anchor after "#". Most redirects will not contain queries or fragment anchors.') .'</div>',
+    '#description' => '<div style="display:block">'. t('Enter a Drupal path, path alias, or external URL to redirect to. Use %front to redirect to the front page.  Enter (optional) queries after "?" and (optional) anchor after "#". Most redirects will not contain queries or fragment anchors.', array('%front' => '<front>')) .'</div>',
   );
   
   $form['redirect']['redirect'] = array(
@@ -255,11 +256,14 @@ function path_redirect_edit_validate($fo
     form_set_error('path', t('The redirect <strong>from</strong> path does not appear valid. This must be a local Drupal path.'));
   }
   
-  if (!valid_url($form_values['redirect']) && !valid_url($form_values['redirect'], TRUE)) {
+  if (!valid_url($form_values['redirect']) && !valid_url($form_values['redirect'], TRUE) && $form_values['redirect'] != '<front>') {
     form_set_error('redirect', t('The redirect <strong>to</strong> path does not appear valid.'));
   }
   
   $form_values['path'] = drupal_get_normal_path($form_values['path']);
+  if ($form_values['redirect'] == '<front>') {
+    $form_values['redirect'] = variable_get('site_frontpage', 'node');
+  }
   $form_values['redirect'] = drupal_get_normal_path($form_values['redirect']);
   
   //check that there there are no redirect loops
