diff --git a/functions.php b/functions.php index 50f6bad0..27c8a756 100644 --- a/functions.php +++ b/functions.php @@ -405,4 +405,17 @@ function getDomainExpirationDate($name){ return '0000-00-00'; } + +function clean_file_name($string){ + $string = strtolower($string); + + // Gets rid of spaces + $clean_file_name = preg_replace('/\s/', '', $string); + + // Gets rid of non-alphanumerics + $clean_file_name = preg_replace( '/[^A-Za-z0-9_]/', '', $string ); + + return $clean_file_name; +} + ?> diff --git a/post.php b/post.php index 03c4832f..18f7d786 100644 --- a/post.php +++ b/post.php @@ -7552,7 +7552,7 @@ if(isset($_GET['export_client_pdf'])){ var docDefinition = { info: { - title: '- IT Documentation', + title: '- IT Documentation', author: }, @@ -8734,7 +8734,7 @@ if(isset($_GET['export_client_pdf'])){ }; - pdfMake.createPdf(docDefinition).download('-IT_Documentation-.pdf'); + pdfMake.createPdf(docDefinition).download('-IT_Documentation-.pdf');