From 7ee585b3e3c9c2f033c63a0d5fa854d1be4fa140 Mon Sep 17 00:00:00 2001 From: crcro Date: Sun, 18 Sep 2016 17:04:08 +0300 Subject: [PATCH] remove newlines, alphanumeric and hippen accepted --- includes/discovery/toner.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/toner.inc.php b/includes/discovery/toner.inc.php index 4df1ccfdd0..7eefab5bef 100644 --- a/includes/discovery/toner.inc.php +++ b/includes/discovery/toner.inc.php @@ -31,7 +31,7 @@ if ($device['os_group'] == 'printer') { $capacity_oid = ".1.3.6.1.2.1.43.11.1.1.8.1.$index"; } - $descr = trim(preg_replace('/[^A-Za-z0-9\-]/', '', snmp_get($device, $descr_oid, '-Oqv'))); + $descr = trim(str_replace("\n", '', preg_replace('/[^A-Za-z0-9\-]/', '', snmp_get($device, $descr_oid, '-Oqv')))); if ($descr != '') { $current = snmp_get($device, $toner_oid, '-Oqv');