mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
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
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Apr 23 09:35:12 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* python/libxml.c python/libxml.py: applied patch from
|
* python/libxml.c python/libxml.py: applied patch from
|
||||||
|
@ -5918,7 +5918,7 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax, void *user_data,
|
|||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
inputStream->filename = NULL;
|
inputStream->filename = NULL;
|
||||||
else
|
else
|
||||||
inputStream->filename = xmlMemStrdup(filename);
|
inputStream->filename = xmlCanonicPath(filename);
|
||||||
inputStream->buf = buf;
|
inputStream->buf = buf;
|
||||||
inputStream->base = inputStream->buf->buffer->content;
|
inputStream->base = inputStream->buf->buffer->content;
|
||||||
inputStream->cur = inputStream->buf->buffer->content;
|
inputStream->cur = inputStream->buf->buffer->content;
|
||||||
@ -6030,8 +6030,7 @@ docbCreateFileParserCtxt(const char *filename,
|
|||||||
}
|
}
|
||||||
memset(inputStream, 0, sizeof(docbParserInput));
|
memset(inputStream, 0, sizeof(docbParserInput));
|
||||||
|
|
||||||
inputStream->filename = (char *)
|
inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
|
||||||
xmlCanonicPath((const xmlChar *)filename);
|
|
||||||
inputStream->line = 1;
|
inputStream->line = 1;
|
||||||
inputStream->col = 1;
|
inputStream->col = 1;
|
||||||
inputStream->buf = buf;
|
inputStream->buf = buf;
|
||||||
|
2
SAX.c
2
SAX.c
@ -253,7 +253,7 @@ externalSubset(void *ctx, const xmlChar *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (input->filename == NULL)
|
if (input->filename == NULL)
|
||||||
input->filename = (char *) xmlStrdup(SystemID);
|
input->filename = (char *) xmlCanonicPath(SystemID);
|
||||||
input->line = 1;
|
input->line = 1;
|
||||||
input->col = 1;
|
input->col = 1;
|
||||||
input->base = ctxt->input->cur;
|
input->base = ctxt->input->cur;
|
||||||
|
@ -788,7 +788,7 @@ xmlParseCatalogFile(const char *filename) {
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inputStream->filename = xmlMemStrdup(filename);
|
inputStream->filename = xmlCanonicPath(filename);
|
||||||
inputStream->buf = buf;
|
inputStream->buf = buf;
|
||||||
inputStream->base = inputStream->buf->buffer->content;
|
inputStream->base = inputStream->buf->buffer->content;
|
||||||
inputStream->cur = inputStream->buf->buffer->content;
|
inputStream->cur = inputStream->buf->buffer->content;
|
||||||
|
@ -1754,7 +1754,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename,
|
|||||||
#ifdef LIBXML_XPATH_ENABLED
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
ctxt->pctxt = xmlXPathNewContext(doc);
|
ctxt->pctxt = xmlXPathNewContext(doc);
|
||||||
#endif /* LIBXML_XPATH_ENABLED */
|
#endif /* LIBXML_XPATH_ENABLED */
|
||||||
ctxt->filename = (char *) xmlStrdup((xmlChar *) filename);
|
ctxt->filename = (char *) xmlCanonicPath((xmlChar *) filename);
|
||||||
} else
|
} else
|
||||||
return (-1);
|
return (-1);
|
||||||
return (0);
|
return (0);
|
||||||
|
4
parser.c
4
parser.c
@ -9543,7 +9543,7 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
|
|||||||
xmlSwitchEncoding(ctxt, enc);
|
xmlSwitchEncoding(ctxt, enc);
|
||||||
|
|
||||||
if (input->filename == NULL)
|
if (input->filename == NULL)
|
||||||
input->filename = (char *) xmlStrdup(SystemID);
|
input->filename = (char *) xmlCanonicPath(SystemID);
|
||||||
input->line = 1;
|
input->line = 1;
|
||||||
input->col = 1;
|
input->col = 1;
|
||||||
input->base = ctxt->input->cur;
|
input->base = ctxt->input->cur;
|
||||||
@ -10681,7 +10681,7 @@ xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
|
|||||||
|
|
||||||
xmlClearParserCtxt(ctxt);
|
xmlClearParserCtxt(ctxt);
|
||||||
if (filename != NULL)
|
if (filename != NULL)
|
||||||
input->filename = xmlMemStrdup(filename);
|
input->filename = xmlCanonicPath(filename);
|
||||||
input->base = buffer;
|
input->base = buffer;
|
||||||
input->cur = buffer;
|
input->cur = buffer;
|
||||||
input->end = &buffer[xmlStrlen(buffer)];
|
input->end = &buffer[xmlStrlen(buffer)];
|
||||||
|
Reference in New Issue
Block a user