From e0ec645613f403140ea2d085d0299ab33361ac22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Wed, 19 May 2021 15:22:24 +0200 Subject: [PATCH] Fixed issue with last hash symbol --- pandora_agents/unix/pandora_revent | 3 ++- pandora_server/util/pandora_revent.pl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_agents/unix/pandora_revent b/pandora_agents/unix/pandora_revent index 0cba15a4eb..5f1bc8c3bd 100755 --- a/pandora_agents/unix/pandora_revent +++ b/pandora_agents/unix/pandora_revent @@ -198,7 +198,8 @@ sub tool_api_main () { $id_group = $ARGV[$i + 1]; } if ($line eq '-name') { - $event_name = join('%23', split("#", $ARGV[$i + 1])); + $event_name = $ARGV[$i + 1]; + $event_name =~ s/#/%23/g; } if ($line eq '-type') { $event_type = $ARGV[$i + 1]; diff --git a/pandora_server/util/pandora_revent.pl b/pandora_server/util/pandora_revent.pl index 0cba15a4eb..5f1bc8c3bd 100755 --- a/pandora_server/util/pandora_revent.pl +++ b/pandora_server/util/pandora_revent.pl @@ -198,7 +198,8 @@ sub tool_api_main () { $id_group = $ARGV[$i + 1]; } if ($line eq '-name') { - $event_name = join('%23', split("#", $ARGV[$i + 1])); + $event_name = $ARGV[$i + 1]; + $event_name =~ s/#/%23/g; } if ($line eq '-type') { $event_type = $ARGV[$i + 1];