Ref #5529 Bugfix: Added uri_unescape

This commit is contained in:
Florian Asche 2014-05-08 15:29:59 +02:00
parent e06e413d86
commit cc41fd3740
3 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@ use centreon::plugins::httplib;
use centreon::plugins::statefile;
use Digest::MD5 qw(md5_hex);
use XML::XPath;
use URI::Escape;
sub new {
my ($class, %options) = @_;
@ -203,6 +204,7 @@ sub manage_selection {
my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
$connector_name =~ s/^["'\s]+//;
$connector_name =~ s/["'\s]+$//;
$connector_name = uri_unescape($connector_name);
next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi})
&& $connector_name !~ /$self->{option_results}->{name}/i);

View File

@ -40,6 +40,7 @@ use strict;
use warnings;
use centreon::plugins::httplib;
use XML::XPath;
use URI::Escape;
sub new {
my ($class, %options) = @_;
@ -160,6 +161,7 @@ sub manage_selection {
my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
$connector_name =~ s/^["'\s]+//;
$connector_name =~ s/["'\s]+$//;
$connector_name = uri_unescape($connector_name);
next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi})
&& $connector_name !~ /$self->{option_results}->{name}/i);

View File

@ -43,6 +43,7 @@ use centreon::plugins::misc;
use centreon::plugins::statefile;
use Digest::MD5 qw(md5_hex);
use XML::XPath;
use URI::Escape;
sub new {
my ($class, %options) = @_;
@ -188,6 +189,7 @@ sub manage_selection {
my $connector_name = $node->getParentNode()->getParentNode()->getAttribute("name");
$connector_name =~ s/^["'\s]+//;
$connector_name =~ s/["'\s]+$//;
$connector_name = uri_unescape($connector_name);
next if (defined($self->{option_results}->{name}) && defined($self->{option_results}->{use_regexp}) && defined($self->{option_results}->{use_regexpi})
&& $connector_name !~ /$self->{option_results}->{name}/i);