Index: views_plugin_argument_validate_taxonomy_term.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc,v
retrieving revision 1.2
diff -u -r1.2 views_plugin_argument_validate_taxonomy_term.inc
--- views_plugin_argument_validate_taxonomy_term.inc	10 Sep 2008 16:17:54 -0000	1.2
+++ views_plugin_argument_validate_taxonomy_term.inc	3 Feb 2009 14:08:23 -0000
@@ -42,12 +42,20 @@
       '#process' => array('views_process_dependency'),
       '#dependency' => array('edit-options-validate-type' => array($this->id)),
     );
+    
+    $form['validate_argument_transform'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Transform spaces to dashes in URL'),
+      '#default_value' => isset($this->argument->options['validate_argument_transform']) ? $this->argument->options['validate_argument_transform'] : FALSE,
+      '#process' => array('views_process_dependency'),
+      '#dependency' => array('edit-options-validate-type' => array($this->id)),
+    );
   }
 
   function validate_argument($argument) {
     $vids = isset($this->argument->options['validate_argument_vocabulary']) ? array_filter($this->argument->options['validate_argument_vocabulary']) : array();
-
     $type = isset($this->argument->options['validate_argument_type']) ? $this->argument->options['validate_argument_type'] : 'tid';
+    $transform = isset($this->argument->options['validate_argument_transform']) ? $this->argument->options['validate_argument_transform'] : FALSE;
 
     switch ($type) {
       case 'tid':
@@ -93,7 +101,9 @@
         if (!empty($vids)) {
           $and = " AND td.vid IN(" . implode(', ', $vids) . ')';
         }
-
+        if ($transform) {
+          $argument = str_replace('-', ' ', $argument);
+        }
         $result = db_fetch_object(db_query("SELECT td.* FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid WHERE (td.name = '%s' OR ts.name = '%s')$and", $argument, $argument));
         if (!$result) {
           return FALSE;

