From 6ec145b0e407cdb6e78b733afae1137ef8abd4fe Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 17 Jan 2015 17:47:59 +0000 Subject: [PATCH] Handle the space used in fax name by adding a dash before it is saved to the database. Then when displaying it remove the dash. --- app/fax/fax_edit.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/fax/fax_edit.php b/app/fax/fax_edit.php index 879aa5fd06..066ac0707d 100644 --- a/app/fax/fax_edit.php +++ b/app/fax/fax_edit.php @@ -210,6 +210,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { return; } + //replace the spaces with a dash + $fax_name = str_replace(" ", "-", $fax_name); + //escape the commas with a backslash and remove the spaces $fax_email = str_replace(" ", "", $fax_email); $fax_email = str_replace(",", "\\,", $fax_email); @@ -572,6 +575,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset ($prep_statement); } +//replace the dash with a space + $fax_name = str_replace("-", " ", $fax_name); + //remove the backslash $fax_email = str_replace("\\", "", $fax_email); @@ -1010,4 +1016,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //show the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file