Commit 85095e2c authored by Daniel Veillard's avatar Daniel Veillard
Browse files

try to find more places where xmlCanonicPath() must be used to convert

* DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find
  more places where xmlCanonicPath() must be used to convert
  filenames to URLs, trying to fix #111088
Daniel
parent 5439624b
Wed Apr 23 15:49:32 CEST 2003 Daniel Veillard <daniel@veillard.com>
* DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find
more places where xmlCanonicPath() must be used to convert
filenames to URLs, trying to fix #111088
Wed Apr 23 09:35:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
* python/libxml.c python/libxml.py: applied patch from
......
......@@ -5918,7 +5918,7 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax, void *user_data,
if (filename == NULL)
inputStream->filename = NULL;
else
inputStream->filename = xmlMemStrdup(filename);
inputStream->filename = xmlCanonicPath(filename);
inputStream->buf = buf;
inputStream->base = inputStream->buf->buffer->content;
inputStream->cur = inputStream->buf->buffer->content;
......@@ -6030,8 +6030,7 @@ docbCreateFileParserCtxt(const char *filename,
}
memset(inputStream, 0, sizeof(docbParserInput));
inputStream->filename = (char *)
xmlCanonicPath((const xmlChar *)filename);
inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
inputStream->line = 1;
inputStream->col = 1;
inputStream->buf = buf;
......
......@@ -253,7 +253,7 @@ externalSubset(void *ctx, const xmlChar *name,
}
if (input->filename == NULL)
input->filename = (char *) xmlStrdup(SystemID);
input->filename = (char *) xmlCanonicPath(SystemID);
input->line = 1;
input->col = 1;
input->base = ctxt->input->cur;
......
......@@ -788,7 +788,7 @@ xmlParseCatalogFile(const char *filename) {
return(NULL);
}
inputStream->filename = xmlMemStrdup(filename);
inputStream->filename = xmlCanonicPath(filename);
inputStream->buf = buf;
inputStream->base = inputStream->buf->buffer->content;
inputStream->cur = inputStream->buf->buffer->content;
......
......@@ -1754,7 +1754,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
#ifdef LIBXML_XPATH_ENABLED
ctxt->pctxt = xmlXPathNewContext(doc);
#endif /* LIBXML_XPATH_ENABLED */
ctxt->filename = (char *) xmlStrdup((xmlChar *) filename);
ctxt->filename = (char *) xmlCanonicPath((xmlChar *) filename);
} else
return (-1);
return (0);
......
......@@ -9543,7 +9543,7 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
xmlSwitchEncoding(ctxt, enc);
if (input->filename == NULL)
input->filename = (char *) xmlStrdup(SystemID);
input->filename = (char *) xmlCanonicPath(SystemID);
input->line = 1;
input->col = 1;
input->base = ctxt->input->cur;
......@@ -10681,7 +10681,7 @@ xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
xmlClearParserCtxt(ctxt);
if (filename != NULL)
input->filename = xmlMemStrdup(filename);
input->filename = xmlCanonicPath(filename);
input->base = buffer;
input->cur = buffer;
input->end = &buffer[xmlStrlen(buffer)];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment