From 9b8b02539d710f8d0481c5bbd35b5688ed8d58be Mon Sep 17 00:00:00 2001 From: ramonn Date: Wed, 3 Nov 2010 19:20:12 +0000 Subject: [PATCH] 2010-11-03 Ramon Novoa * lib/PandoraFMS/Tools.pm: limpia_cadena removes unwanted characters instead or replacing them with blank spaces. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3512 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/Tools.pm | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 9de9b348ab..960c9c3663 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-11-03 Ramon Novoa + + * lib/PandoraFMS/Tools.pm: limpia_cadena removes unwanted + characters instead or replacing them with blank spaces. + 2010-11-03 Sergio Martin * util/pandora_recode_db.pl: Added a recode script to add diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 5f3ef8beb3..3b7be673af 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -369,8 +369,8 @@ sub limpia_cadena { my $micadena; $micadena = $_[0]; if (defined($micadena)){ - $micadena =~ s/[^\-\:\;\.\,\_\s\a\*\=\(\)a-zA-Z0-9]/ /g; - $micadena =~ s/[\n\l\f]/ /g; + $micadena =~ s/[^\-\:\;\.\,\_\s\a\*\=\(\)a-zA-Z0-9]//g; + $micadena =~ s/[\n\l\f]//g; return $micadena; } else { return "";