summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2012-09-04 14:53:14 +0800
committerDaniel Veillard <veillard@redhat.com>2012-09-04 14:53:14 +0800
commit14ee81b06c12743a88fbc1676f3d35a86a74e08e (patch)
tree7575201b132897ec2a4043732300ffe226e26f61
parent0602c535e9c34efca22dba1b1b7465e0618e7bfc (diff)
downloadlibxslt-14ee81b06c12743a88fbc1676f3d35a86a74e08e.tar.gz
libxslt-14ee81b06c12743a88fbc1676f3d35a86a74e08e.tar.bz2
libxslt-14ee81b06c12743a88fbc1676f3d35a86a74e08e.zip
Fix for EXSLT func:function
For https://bugzilla.gnome.org/show_bug.cgi?id=680920 If the first child of a func:function template is xslt:text, it will be removed by xsltParseTemplateContent. So xsltParseTemplateContent should be called before setting func->content to the first child.
-rw-r--r--libexslt/functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexslt/functions.c b/libexslt/functions.c
index 4c68cea9..e7bb2f14 100644
--- a/libexslt/functions.c
+++ b/libexslt/functions.c
@@ -488,6 +488,8 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
}
xmlFree(prefix);
+ xsltParseTemplateContent(style, inst);
+
/*
* Create function data
*/
@@ -499,8 +501,6 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
func->nargs++;
}
- xsltParseTemplateContent(style, inst);
-
/*
* Register the function data such that it can be retrieved
* by exslFuncFunctionFunction