So yeah -- you can upload files like "Ben's Awesome Lesson Plan.doc", and users can download it, but you can't delete it -- I'm assuming it's goofing up the javascript responsible for deletion. So in the module code, I changed the first line of _sanitize_filename() from

$special_chars = array("?","[","]","/","\\","=","+","<",">",":",";",",");

to

$special_chars = array("?","[","]","/","\\","=","+","<",">",":",";",",","'","\"");

Something you may want to throw into the next release...

Comments

Zefling’s picture

Or accept the quotes and apostrophes :

Line 636

           $output .= '<a href="javascript:submitDelete(\''
            .$dir.'/'.str_replace("'", "\'", str_replace('"', '&quot;', $file[$x])).'\');" alt="delete file" class="fs_delete">'
            ."&nbsp;</a>\n";

Line 660

            $output .= '<a href="javascript:submitDelete(\''
            .$dir.'/'.str_replace("'", "\'", str_replace('"', '&quot;', $file[$x])).'\');" alt="delete file" class="fs_delete">'
            ."&nbsp;</a>\n";