mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +03:00
fixed teh 2 stupid bugs affecting htmlReadDoc() and htmlReadIO() this
* HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and htmlReadIO() this should fix #340322 Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Oct 17 22:04:31 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
|
||||||
|
htmlReadIO() this should fix #340322
|
||||||
|
|
||||||
Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
Tue Oct 17 21:39:23 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* xpath.c: applied patch from Olaf Walkowiak which should fix #334104
|
* xpath.c: applied patch from Olaf Walkowiak which should fix #334104
|
||||||
|
@ -4347,7 +4347,8 @@ htmlCreateMemoryParserCtxt(const char *buffer, int size) {
|
|||||||
* Returns the new parser context or NULL
|
* Returns the new parser context or NULL
|
||||||
*/
|
*/
|
||||||
static htmlParserCtxtPtr
|
static htmlParserCtxtPtr
|
||||||
htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding ATTRIBUTE_UNUSED) {
|
htmlCreateDocParserCtxt(const xmlChar *cur,
|
||||||
|
const char *encoding ATTRIBUTE_UNUSED) {
|
||||||
int len;
|
int len;
|
||||||
htmlParserCtxtPtr ctxt;
|
htmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
@ -5936,7 +5937,7 @@ htmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int opti
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
ctxt = xmlCreateDocParserCtxt(cur);
|
ctxt = htmlCreateDocParserCtxt(cur, NULL);
|
||||||
if (ctxt == NULL)
|
if (ctxt == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
return (htmlDoRead(ctxt, URL, encoding, options, 0));
|
return (htmlDoRead(ctxt, URL, encoding, options, 0));
|
||||||
@ -6060,7 +6061,7 @@ htmlReadIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose,
|
|||||||
XML_CHAR_ENCODING_NONE);
|
XML_CHAR_ENCODING_NONE);
|
||||||
if (input == NULL)
|
if (input == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
ctxt = xmlNewParserCtxt();
|
ctxt = htmlNewParserCtxt();
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
xmlFreeParserInputBuffer(input);
|
xmlFreeParserInputBuffer(input);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Reference in New Issue
Block a user