1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

encode any xml entities in the stats before applying them to the

xsl pages

svn path=/icecast/trunk/icecast/; revision=7494
This commit is contained in:
Karl Heyes 2004-08-07 02:33:12 +00:00
parent ebecd7cb0a
commit dac2723dbe

View File

@ -738,13 +738,18 @@ void stats_get_xml(xmlDocPtr *doc)
event = _get_event_from_queue(&queue);
while (event) {
if (event->source == NULL) {
xmlNewChild(node, NULL, event->name, event->value);
} else {
while (event)
{
xmlChar *name, *value;
name = xmlEncodeEntitiesReentrant (*doc, event->name);
value = xmlEncodeEntitiesReentrant (*doc, event->value);
srcnode = node;
if (event->source) {
srcnode = _find_xml_node(event->source, &src_nodes, node);
xmlNewChild(srcnode, NULL, event->name, event->value);
}
xmlNewChild(srcnode, NULL, name, value);
xmlFree (value);
xmlFree (name);
_free_event(event);
event = _get_event_from_queue(&queue);