Skip to content

Commit

Permalink
try to find more places where xmlCanonicPath() must be used to convert
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Daniel Veillard committed Apr 23, 2003
1 parent 5439624 commit 85095e2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Wed Apr 23 15:49:32 CEST 2003 Daniel Veillard <[email protected]>

* 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 <[email protected]>

* python/libxml.c python/libxml.py: applied patch from
Expand Down
5 changes: 2 additions & 3 deletions DOCBparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion SAX.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion debugXML.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)];
Expand Down

0 comments on commit 85095e2

Please sign in to comment.