Skip to content
Snippets Groups Projects
Commit e40d478b authored by Peter Rotich's avatar Peter Rotich
Browse files

Assume incoming JSON/XML posts are plain text

parent fd259496
Branches
Tags
No related merge requests found
......@@ -340,6 +340,10 @@ class ApiXmlDataParser extends XmlDataParser {
}
unset($value);
if(isset($current['message']) && $current['message'])
$current['message'] = sprintf('<div style="white-space:pre-wrap">%s</div>',
Format::htmlchars($current['message']));
return $current;
}
}
......@@ -394,6 +398,11 @@ class ApiJsonDataParser extends JsonDataParser {
$value = $this->fixup($value);
}
}
if(isset($current['message']) && $current['message'])
$current['message'] = sprintf('<div style="white-space:pre-wrap">%s</div>',
Format::htmlchars($current['message']));
return $current;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment