mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-08 11:02:18 +03:00
do not escape content of CDATA nodes on output Daniel
* libxslt/xslt.c: do not escape content of CDATA nodes on output Daniel
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Sat May 5 18:09:15 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* libxslt/xslt.c: do not escape content of CDATA nodes on output
|
||||||
|
|
||||||
Sat May 5 17:52:52 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Sat May 5 17:52:52 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* doc/internals.html doc/node.fig doc/node.gif doc/processing.fig
|
* doc/internals.html doc/node.fig doc/node.gif doc/processing.fig
|
||||||
|
|||||||
@@ -478,6 +478,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
|||||||
#endif
|
#endif
|
||||||
copy = xmlNewDocText(ctxt->output, node->content);
|
copy = xmlNewDocText(ctxt->output, node->content);
|
||||||
if (copy != NULL) {
|
if (copy != NULL) {
|
||||||
|
copy->name = xmlStringTextNoenc;
|
||||||
xmlAddChild(ctxt->insert, copy);
|
xmlAddChild(ctxt->insert, copy);
|
||||||
} else {
|
} else {
|
||||||
xsltGenericError(xsltGenericErrorContext,
|
xsltGenericError(xsltGenericErrorContext,
|
||||||
@@ -662,6 +663,7 @@ xsltDefaultProcessOneNode(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
|||||||
#endif
|
#endif
|
||||||
copy = xmlNewDocText(ctxt->output, node->content);
|
copy = xmlNewDocText(ctxt->output, node->content);
|
||||||
if (copy != NULL) {
|
if (copy != NULL) {
|
||||||
|
copy->name = xmlStringTextNoenc;
|
||||||
xmlAddChild(ctxt->insert, copy);
|
xmlAddChild(ctxt->insert, copy);
|
||||||
} else {
|
} else {
|
||||||
xsltGenericError(xsltGenericErrorContext,
|
xsltGenericError(xsltGenericErrorContext,
|
||||||
@@ -929,7 +931,8 @@ xsltApplyOneTemplate(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||||||
#endif
|
#endif
|
||||||
copy = xmlNewText(cur->content);
|
copy = xmlNewText(cur->content);
|
||||||
if (copy != NULL) {
|
if (copy != NULL) {
|
||||||
if (cur->name == xmlStringTextNoenc)
|
if ((cur->name == xmlStringTextNoenc) ||
|
||||||
|
(cur->type == XML_CDATA_SECTION_NODE))
|
||||||
copy->name = xmlStringTextNoenc;
|
copy->name = xmlStringTextNoenc;
|
||||||
xmlAddChild(insert, copy);
|
xmlAddChild(insert, copy);
|
||||||
} else {
|
} else {
|
||||||
@@ -1229,7 +1232,8 @@ xsltCopy(xsltTransformContextPtr ctxt, xmlNodePtr node,
|
|||||||
#endif
|
#endif
|
||||||
copy = xmlNewText(node->content);
|
copy = xmlNewText(node->content);
|
||||||
if (copy != NULL) {
|
if (copy != NULL) {
|
||||||
if (node->name == xmlStringTextNoenc)
|
if ((node->name == xmlStringTextNoenc) ||
|
||||||
|
(node->type == XML_CDATA_SECTION_NODE))
|
||||||
copy->name = xmlStringTextNoenc;
|
copy->name = xmlStringTextNoenc;
|
||||||
xmlAddChild(ctxt->insert, copy);
|
xmlAddChild(ctxt->insert, copy);
|
||||||
} else {
|
} else {
|
||||||
@@ -1325,7 +1329,7 @@ xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
copy = xmlNewDocText(ctxt->output, text->content);
|
copy = xmlNewDocText(ctxt->output, text->content);
|
||||||
if (comp->noescape) {
|
if ((comp->noescape) || (text->type != XML_CDATA_SECTION_NODE)) {
|
||||||
#ifdef WITH_XSLT_DEBUG_PARSING
|
#ifdef WITH_XSLT_DEBUG_PARSING
|
||||||
xsltGenericDebug(xsltGenericDebugContext,
|
xsltGenericDebug(xsltGenericDebugContext,
|
||||||
"Disable escaping: %s\n", text->content);
|
"Disable escaping: %s\n", text->content);
|
||||||
|
|||||||
Reference in New Issue
Block a user