[libxml2] 575875 don't output charset=html



commit 74eb54b5b79f39b7e27f8a94c2a1425586e5353e
Author: Daniel Veillard <veillard redhat com>
Date:   Wed Aug 12 15:59:01 2009 +0200

    575875 don't output charset=html
    
    * HTMLtree.c: don't output charset=html in htmlSetMetaEncoding()
      as this is clearly a libxml2 only thingused for import only

 HTMLtree.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/HTMLtree.c b/HTMLtree.c
index 37999f7..d55ff28 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]