[libxml2] Fix htmlTagLookup
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix htmlTagLookup
- Date: Thu, 6 May 2021 09:04:14 +0000 (UTC)
commit 7279d236364739a05657a8a614c15990eb08d0c6
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Thu May 6 10:37:07 2021 +0200
Fix htmlTagLookup
Fix regression introduced with b25acce8. Some users like libxslt may
call the HTML output functions on documents with uppercase tag names,
so we must keep case-insensitive string comparison.
Fixes #248.
HTMLparser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index adefb3b5..b56363a3 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -1418,10 +1418,10 @@ htmlInitAutoClose(void) {
static int
htmlCompareTags(const void *key, const void *member) {
- const char *tag = (const char *) key;
+ const xmlChar *tag = (const xmlChar *) key;
const htmlElemDesc *desc = (const htmlElemDesc *) member;
- return(strcmp(tag, desc->name));
+ return(xmlStrcasecmp(tag, BAD_CAST desc->name));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]