1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

html: Deprecate more functions

This commit is contained in:
Nick Wellnhofer
2025-04-09 21:11:47 +02:00
parent ef73541a5a
commit 2ecc08f6dc
3 changed files with 19 additions and 0 deletions

View File

@ -1266,6 +1266,8 @@ htmlCompareTags(const void *key, const void *member) {
* htmlTagLookup: * htmlTagLookup:
* @tag: The tag name in lowercase * @tag: The tag name in lowercase
* *
* DEPRECATED: Only supports HTML 4.
*
* Lookup the HTML tag in the ElementTable * Lookup the HTML tag in the ElementTable
* *
* Returns the related htmlElemDescPtr or NULL if not found. * Returns the related htmlElemDescPtr or NULL if not found.
@ -1583,6 +1585,8 @@ htmlStartCharData(htmlParserCtxtPtr ctxt) {
* htmlIsScriptAttribute: * htmlIsScriptAttribute:
* @name: an attribute name * @name: an attribute name
* *
* DEPRECATED: Only supports HTML 4.
*
* Check if an attribute is of content type Script * Check if an attribute is of content type Script
* *
* Returns 1 is the attribute is a script 0 otherwise * Returns 1 is the attribute is a script 0 otherwise
@ -1907,6 +1911,8 @@ static const htmlEntityDesc html40EntitiesTable[] = {
* htmlEntityLookup: * htmlEntityLookup:
* @name: the entity name * @name: the entity name
* *
* DEPRECATED: Only supports HTML 4.
*
* Lookup the given entity in EntitiesTable * Lookup the given entity in EntitiesTable
* *
* TODO: the linear scan is really ugly, an hash table is really needed. * TODO: the linear scan is really ugly, an hash table is really needed.
@ -1938,6 +1944,8 @@ htmlCompareEntityDesc(const void *vkey, const void *vdesc) {
* htmlEntityValueLookup: * htmlEntityValueLookup:
* @value: the entity's unicode value * @value: the entity's unicode value
* *
* DEPRECATED: Only supports HTML 4.
*
* Lookup the given entity in EntitiesTable * Lookup the given entity in EntitiesTable
* *
* TODO: the linear scan is really ugly, an hash table is really needed. * TODO: the linear scan is really ugly, an hash table is really needed.
@ -1963,6 +1971,8 @@ htmlEntityValueLookup(unsigned int value) {
* @in: a pointer to an array of UTF-8 chars * @in: a pointer to an array of UTF-8 chars
* @inlen: the length of @in * @inlen: the length of @in
* *
* DEPRECATED: Internal function, don't use.
*
* Take a block of UTF-8 chars in and try to convert it to an ASCII * Take a block of UTF-8 chars in and try to convert it to an ASCII
* plus HTML entities block of chars out. * plus HTML entities block of chars out.
* *
@ -2064,6 +2074,8 @@ done:
* @inlen: the length of @in * @inlen: the length of @in
* @quoteChar: the quote character to escape (' or ") or zero. * @quoteChar: the quote character to escape (' or ") or zero.
* *
* DEPRECATED: Only supports HTML 4.
*
* Take a block of UTF-8 chars in and try to convert it to an ASCII * Take a block of UTF-8 chars in and try to convert it to an ASCII
* plus HTML entities block of chars out. * plus HTML entities block of chars out.
* *

View File

@ -89,10 +89,13 @@ XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLPUBFUN void
htmlInitAutoClose (void); htmlInitAutoClose (void);
XML_DEPRECATED
XMLPUBFUN const htmlElemDesc * XMLPUBFUN const htmlElemDesc *
htmlTagLookup (const xmlChar *tag); htmlTagLookup (const xmlChar *tag);
XML_DEPRECATED
XMLPUBFUN const htmlEntityDesc * XMLPUBFUN const htmlEntityDesc *
htmlEntityLookup(const xmlChar *name); htmlEntityLookup(const xmlChar *name);
XML_DEPRECATED
XMLPUBFUN const htmlEntityDesc * XMLPUBFUN const htmlEntityDesc *
htmlEntityValueLookup(unsigned int value); htmlEntityValueLookup(unsigned int value);
@ -149,16 +152,19 @@ XMLPUBFUN htmlDocPtr
XMLPUBFUN htmlDocPtr XMLPUBFUN htmlDocPtr
htmlParseFile (const char *filename, htmlParseFile (const char *filename,
const char *encoding); const char *encoding);
XML_DEPRECATED
XMLPUBFUN int XMLPUBFUN int
htmlUTF8ToHtml (unsigned char *out, htmlUTF8ToHtml (unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
int *inlen); int *inlen);
XML_DEPRECATED
XMLPUBFUN int XMLPUBFUN int
htmlEncodeEntities(unsigned char *out, htmlEncodeEntities(unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
int *inlen, int quoteChar); int *inlen, int quoteChar);
XML_DEPRECATED
XMLPUBFUN int XMLPUBFUN int
htmlIsScriptAttribute(const xmlChar *name); htmlIsScriptAttribute(const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED

View File

@ -301,6 +301,7 @@ deprecated_funcs = {
'htmlInitAutoClose': True, 'htmlInitAutoClose': True,
'htmlIsAutoClosed': True, 'htmlIsAutoClosed': True,
'htmlIsBooleanAttr': True, 'htmlIsBooleanAttr': True,
'htmlIsScriptAttribute': True,
'htmlParseCharRef': True, 'htmlParseCharRef': True,
'htmlParseElement': True, 'htmlParseElement': True,
'xmlByteConsumed': True, 'xmlByteConsumed': True,