mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Jumbo patch, resync of W3C/Gnome CVS trees:
- uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished the cleanup of the computation of URI references when seeking external entities. The URI reference string and the resulting URI are both stored now. - parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c: large s(n)printf checks and cleanup from Denis Barbier <barbier@imacs.polytechnique.fr> - xmlversion.h.in tree.h: couple of SGML declarations for a possible docbook module. - result/VC/ : a couple of test output changed due to the change of the entities URI Daniel
This commit is contained in:
11
HTMLtree.c
11
HTMLtree.c
@ -181,12 +181,13 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
|
||||
return(-1);
|
||||
|
||||
if (encoding != NULL) {
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#ifdef HAVE_SNPRINTF
|
||||
snprintf(newcontent, sizeof(newcontent), "text/html; charset=%s",
|
||||
encoding);
|
||||
#else
|
||||
sprintf(newcontent, "text/html; charset=%s", encoding);
|
||||
#else /* HAVE_SNPRINTF */
|
||||
snprintf(newcontent, 99, "text/html; charset=%s", encoding);
|
||||
#endif /* HAVE_SNPRINTF */
|
||||
newcontent[99] = 0;
|
||||
#endif
|
||||
newcontent[sizeof(newcontent) - 1] = 0;
|
||||
}
|
||||
|
||||
cur = doc->children;
|
||||
|
Reference in New Issue
Block a user