1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-21 22:50:08 +03:00

save: Fix build --without-html

Fixes #646
This commit is contained in:
Nick Wellnhofer 2023-12-14 13:37:43 +01:00
parent 5d2dbe79fa
commit 6c8acdecd2

View File

@ -729,6 +729,7 @@ xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
}
xmlOutputBufferWriteString(buf, (const char *)cur->name);
xmlOutputBufferWrite(buf, 2, "=\"");
#ifdef LIBXML_HTML_ENABLED
if ((ctxt->options & XML_SAVE_XHTML) &&
(cur->ns == NULL) &&
((cur->children == NULL) ||
@ -736,7 +737,9 @@ xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
(cur->children->content[0] == 0)) &&
(htmlIsBooleanAttr(cur->name))) {
xmlOutputBufferWriteString(buf, (const char *) cur->name);
} else {
} else
#endif
{
xmlAttrSerializeContent(buf, cur);
}
xmlOutputBufferWrite(buf, 1, "\"");