Fixed XML inside logs in grep_log plugins

This commit is contained in:
fermin831 2018-08-02 14:59:52 +02:00
parent fdedc78b24
commit d0b5d6ae29
1 changed files with 6 additions and 2 deletions

View File

@ -325,7 +325,9 @@ sub print_log ($) {
$output .= "<source><![CDATA[" . $Module_name . "]]></source>\n";
$output .= "<data><![CDATA[";
foreach my $line (@kdata) {
$output .= $data->{$line};
my $processed_line = $line;
$processed_line =~ s/\]\]/]]]]><![CDATA[/g;
$output .= $processed_line;
}
$output .= "]]></data>";
$output .= "</log_module>\n";
@ -343,7 +345,9 @@ sub print_log ($) {
foreach my $line (@kdata) {
$output .= "<data><value><![CDATA[";
foreach my $content (@{$data->{$line}}) {
$output .= $content;
my $processed_line = $content;
$processed_line =~ s/\]\]/]]]]><![CDATA[/g;
$output .= $processed_line;
}
$output .= "]]></value></data>\n";
}