From: hickert Date: Fri, 12 Oct 2007 07:19:19 +0000 (+0000) Subject: Replace all not printerable chars with _ X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6520bb2b2f868a67fb65b1e5537f3e5dee3de03b;p=gosa.git Replace all not printerable chars with _ git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7528 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index f8b4433aa..11545d4b4 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -192,7 +192,7 @@ class printerPPDDialog extends plugin $Model = trim(preg_replace("/".$Vendor."/","",$Name)); } - $PrinterName = $this->cn."-".$Name; + $PrinterName = $this->cn."-".preg_replace("/[^a-z0-9-_\.]/i","_",$Name); $PPDName = $Vendor."/".$PrinterName.".ppd"; /* Create the vendors path, if it doesn't exists already */