Merge branch 'ent-2053-5455-BADXML-por-tener-etiquetas-XML-en-logs' into 'develop'

Ent 2053 5455 badxml por tener etiquetas xml en logs

See merge request artica/pandorafms!1376
This commit is contained in:
vgilc 2018-03-22 09:54:36 +01:00
commit 3d268b7de4
2 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,7 @@ sub print_log (@) {
$output .= "<source><![CDATA[" . $Module_name . "]]></source>\n";
$output .= "<data><![CDATA[";
foreach my $line (@data) {
$line =~ s/\]\]/]]]]><![CDATA[/g;
$output .= $line;
}
$output .= "]]></data>";
@ -229,6 +230,7 @@ sub print_log (@) {
$output .= "<type><![CDATA[async_string]]></type>\n";
$output .= "<datalist>\n";
foreach my $line (@data) {
$line =~ s/\]\]/]]]]><![CDATA[/g;
$output .= "<data><value><![CDATA[$line]]></value></data>\n";
}
$output .= "</datalist>\n";

View File

@ -532,6 +532,7 @@ Pandora_Module::getXml () {
try {
data_clean = strreplace (this->getDataOutput (data),
"%", "%%" );
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
} catch (Module_Exception e) {
continue;
}
@ -542,6 +543,7 @@ Pandora_Module::getXml () {
data = data_list->front ();
try {
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
data_clean = strreplace (data_clean, "]]>", "]]><![CDATA[");
module_xml += data_clean;
} catch (Module_Exception e) {