--- fileshare.module.orig	2007-03-10 00:12:22.000000000 -0800
+++ fileshare.module	2007-03-10 01:50:52.000000000 -0800
@@ -671,7 +671,7 @@
         $output .= '<a href="javascript:;" onclick="fileshare_folder(this,\''.$pre.$tag.'\');" ';
         $output .= 'alt="'.$node->_basepath.$node->_filepath.$dir.'/'.$file[$x].'" ';
         $output .= 'name="'.url('fileshare/handler/'.$node->nid
-          ,'dir='.$dir.'/'.$file[$x]
+          ,'dir='.urlencode($dir.'/'.$file[$x])
           .'&pre='.$pre.$tag).'" ';
         $output .= 'class="fs_closed">'."\n";
         $output .= $file[$x]; 
