summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2007-01-15 02:49:25 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2007-01-15 02:49:25 +0000
commitbb599795eb8e243eeaca603a6ea68932ca0998d5 (patch)
treebca0d8d79933cd55eea2ad50d3bd47114cbfdea3
parent139e8ffcec46329bd45265c891e22ff26c442cb6 (diff)
downloadlibxslt-bb599795eb8e243eeaca603a6ea68932ca0998d5.tar.gz
libxslt-bb599795eb8e243eeaca603a6ea68932ca0998d5.tar.bz2
libxslt-bb599795eb8e243eeaca603a6ea68932ca0998d5.zip
fixed two problems related to checking of fragments, related to python
* libxslt/functions.c: fixed two problems related to checking of fragments, related to python htmlCtxtReadFile problem reported on mailing list by Nic Ferrier. svn path=/trunk/; revision=1417
-rw-r--r--ChangeLog6
-rw-r--r--libxslt/functions.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bb3ed28c..e4e52f27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jan 14 18:45:08 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * libxslt/functions.c: fixed two problems related to checking
+ of fragments, related to python htmlCtxtReadFile problem
+ reported on mailing list by Nic Ferrier.
+
Fri Jan 12 23:24:08 PST 2007 William Brack <wbrack@mmm.com.hk>
* libxslt/extensions.c: reverted last change, fixed some
diff --git a/libxslt/functions.c b/libxslt/functions.c
index 9e120a94..7ae24999 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -133,10 +133,11 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
*/
fragment = (xmlChar *)uri->fragment;
if (fragment != NULL) {
+ xmlChar *newURI;
uri->fragment = NULL;
- URI = xmlSaveUri(uri);
- idoc = xsltLoadDocument(tctxt, URI);
- xmlFree(URI);
+ newURI = xmlSaveUri(uri);
+ idoc = xsltLoadDocument(tctxt, newURI);
+ xmlFree(newURI);
} else
idoc = xsltLoadDocument(tctxt, URI);
xmlFreeURI(uri);
@@ -144,7 +145,8 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
if (idoc == NULL) {
if ((URI == NULL) ||
(URI[0] == '#') ||
- (xmlStrEqual(tctxt->style->doc->URL, URI)))
+ ((tctxt->style->doc != NULL) &&
+ (xmlStrEqual(tctxt->style->doc->URL, URI))))
{
/*
* This selects the stylesheet's doc itself.