aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HTMLtree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/HTMLtree.c b/HTMLtree.c
index 37999f79..d55ff286 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -168,6 +168,10 @@ htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding) {
if (doc == NULL)
return(-1);
+ /* html isn't a real encoding it's just libxml2 way to get entities */
+ if (!xmlStrcasecmp(encoding, BAD_CAST "html"))
+ return(-1);
+
if (encoding != NULL) {
snprintf(newcontent, sizeof(newcontent), "text/html; charset=%s",
(char *)encoding);