diff --git a/filefield_paths.module b/filefield_paths.module
index 9bca292..9cf8cff 100644
--- a/filefield_paths.module
+++ b/filefield_paths.module
@@ -605,6 +605,16 @@ function filefield_paths_process_string($value, $data, $settings = array()) {
     }
   }
 
+  //Cleanup with pathauto
+  if ( module_exists('pathauto')  && (isset($settings['pathauto'])) && $settings['pathauto']) {
+    module_load_include('inc', 'pathauto');
+    $paths = explode('/', $value);
+      foreach ($paths as $path) {
+        $path = pathauto_cleanstring($path);
+    }
+    $value = implode('/', $paths);
+  }  
+
   // Convert string to lower case.
   if ((isset($settings['tolower']) && $settings['tolower']) || (isset($settings['pathauto']) && $settings['pathauto'] && variable_get('pathauto_case', 0))) {
     // Convert string to lower case
