You are here

function _sheetnode_sanitize_filename in Sheetnode 5

1 call to _sheetnode_sanitize_filename()
_sheetnode_phpexcel_export_do in modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc

File

./sheetnode.module, line 713

Code

function _sheetnode_sanitize_filename($filename, $extension) {
  $filename = preg_replace('/[^a-zA-Z0-9-_.]/', '-', $filename);
  $filename .= '.' . $extension;
  return $filename;
}