Merge branch 'ent-2498-6126-plugin-grep_log-crea-badxml' into 'develop'
Fixed XML inside logs in grep_log plugins See merge request artica/pandorafms!1657
This commit is contained in:
commit
ea22ed90e0
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue