do not output hexadecimal charrefs when serializing HTML since some

* encoding.c entities.c: do not output hexadecimal charrefs
  when serializing HTML since some version of Netscape can't
  grok it, generate decimal ones.
* result/HTML/doc3.htm: output changed due to previous test
* parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4
Daniel
diff --git a/ChangeLog b/ChangeLog
index 44580eb..4d62f00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Sep 14 12:26:58 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+	* encoding.c entities.c: do not output hexadecimal charrefs
+	  when serializing HTML since some version of Netscape can't
+	  grok it, generate decimal ones.
+	* result/HTML/doc3.htm: output changed due to previous test
+	* parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4
+
 Thu Sep 13 13:34:27 CEST 2001 Daniel Veillard <daniel@veillard.com>
 
 	* libxml-2.0.pc.in: dohh generated the wrong include path :-(
diff --git a/encoding.c b/encoding.c
index 2a76791..8237450 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2264,7 +2264,7 @@
 		 * and continue the transcoding phase, hoping the error
 		 * did not mangle the encoder state.
 		 */
-		sprintf((char *) charref, "&#x%X;", cur);
+		sprintf((char *) charref, "&#%d;", cur);
 		xmlBufferShrink(in, len);
 		xmlBufferAddHead(in, charref, -1);
 
diff --git a/entities.c b/entities.c
index afa871b..a230666 100644
--- a/entities.c
+++ b/entities.c
@@ -708,7 +708,10 @@
 		/*
 		 * We could do multiple things here. Just save as a char ref
 		 */
-		snprintf(buf, sizeof(buf), "&#x%X;", val);
+		if (html)
+		    snprintf(buf, sizeof(buf), "&#%d;", val);
+		else
+		    snprintf(buf, sizeof(buf), "&#x%X;", val);
 		buf[sizeof(buf) - 1] = 0;
 		ptr = buf;
 		while (*ptr != 0) *out++ = *ptr++;
diff --git a/parserInternals.c b/parserInternals.c
index 40aa0b1..0273770 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -46,6 +46,7 @@
 #include <libxml/valid.h>
 #include <libxml/xmlIO.h>
 #include <libxml/uri.h>
+#include <libxml/SAX.h>
 #ifdef LIBXML_CATALOG_ENABLED
 #include <libxml/catalog.h>
 #endif
@@ -2259,6 +2260,9 @@
     ctxt->pedantic = xmlPedanticParserDefaultValue;
     ctxt->linenumbers = xmlLineNumbersDefaultValue;
     ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
+    if (ctxt->keepBlanks == 0)
+	sax->ignorableWhitespace = ignorableWhitespace;
+
     ctxt->vctxt.userData = ctxt;
     if (ctxt->validate) {
 	ctxt->vctxt.error = xmlParserValidityError;
diff --git a/result/HTML/doc3.htm b/result/HTML/doc3.htm
index d516ca9..cdc4dc1 100644
--- a/result/HTML/doc3.htm
+++ b/result/HTML/doc3.htm
@@ -104,11 +104,11 @@
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">Chat with 

             ABIT</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 8:09PM 

             PDT</small>  <a href="http://bp6.gamesquad.net/news/965012956,78924,.html"><img border="0" src="doc3_files/comments.gif">0 comments</a> 

-             | <a href="http://bp6.gamesquad.net/#news_top">top</a></font><br><font color="black" face="Arial" size="2">I&#x2019;m slacking a little. All game no 

+             | <a href="http://bp6.gamesquad.net/#news_top">top</a></font><br><font color="black" face="Arial" size="2">I&#8217;m slacking a little. All game no 

             work makes Holodeck2 a happy boy :-)<br><br>Wallpaper update: I got 

             off my lazy ass and redid the 1280x1024 wall paper, now it has the 2 

             celerons.<br><br><b><a href="http://fullon3d.com/chat/abit/" target="3d">Fullon3d had a live chat with that Eric guy from Abit. 

-            </a></b>Submitted by: MJS<br><br>Here&#x2019;s a little clip:<br>[Falcon] 

+            </a></b>Submitted by: MJS<br><br>Here&#8217;s a little clip:<br>[Falcon] 

             BP6-2??<br>[EricBoeing] We already have a micro ATX dual flip-chip 

             board<br>[EricBoeing] but it's OEM only<br>[EricBoeing] the full ATX 

             version should be out Septemberish<br></font><br><br><a name="newsitem964766837,26344,"></a><table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Thursday, 

@@ -165,7 +165,7 @@
             on a small chip (CPU, GPU, CHIPSET, etc)<br><br><img height="173" src="doc3_files/voodooside2.jpg" width="230"><br>My overclocked 

             Voodoo3 2000 with a BIG mofo heatsink on top.<br>Peltier and 

             watercooling next up :-)<br>(if you pry off the heatsink you void 

-            the warranty )<br><br>it was originally posted on <a href="http://www.hardocp.com/">[H]ardOCP </a><br>I&#x2019;m not only a 

+            the warranty )<br><br>it was originally posted on <a href="http://www.hardocp.com/">[H]ardOCP </a><br>I&#8217;m not only a 

             BP6er but also a [H]ardOCPer<br></font><br><br><a name="newsitem964644047,60218,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">WiLd CaSe!!</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 1:40PM 

             PDT</small>  <a href="http://bp6.gamesquad.net/news/964644047,60218,.html"><img border="0" src="doc3_files/comments.gif">8 comments</a> 

              | <a href="http://bp6.gamesquad.net/#news_top">top</a></font><br><font color="black" face="Arial" size="2">Now this person really knows how to 

@@ -188,9 +188,9 @@
             EVERYONE!!!</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 10:03PM 

             PDT</small>  <br><font color="black" face="Arial" size="2">Hello 

             everyone, Woohoo!! I'm on!!<br>Who is this Holodeck2 person 

-            anyways?!?! Read on :-)<br>I&#x2019;m a regular on the bp6 messageboard, 

-            trying to help people out with their problems.<br>I&#x2019;m the 

-            self-proclaimed bp6 cooling expert, If you have a cooling idea, I&#x2019;ve 

+            anyways?!?! Read on :-)<br>I&#8217;m a regular on the bp6 messageboard, 

+            trying to help people out with their problems.<br>I&#8217;m the 

+            self-proclaimed bp6 cooling expert, If you have a cooling idea, I&#8217;ve 

             probably already done it and can offer some incite.<br>My computer 

             is always on so you can contact me whenever... problem is, I'm not 

             always in front of it. I'll try to update this page and keep 

@@ -200,9 +200,9 @@
             will be answered in 24 hours or less, I guarantee it.)<br>When you 

             write me an e-mail please put in the subject line &quot;BP6&quot; then the 

             rest of your subject so my e-mail program can sort it, thanks<br><a href="http://www.aol.com/aim">AIM: </a>Holodeck2 (instant response 

-            if I&#x2019;m in front of my comp and not trying to frag someone)<br><a href="http://www.icq.com/download">ICQ: </a>82640218 (rarely 

-            on)<br><br>P.S. If someone named &#x201C;Digital Vortex&#x201D; on either Quake 3 

-            or 2 frags you, it&#x2019;s probably me. ;-)<br></font><br><br><a name="newsitem964429577,13375,"></a><table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, 

+            if I&#8217;m in front of my comp and not trying to frag someone)<br><a href="http://www.icq.com/download">ICQ: </a>82640218 (rarely 

+            on)<br><br>P.S. If someone named &#8220;Digital Vortex&#8221; on either Quake 3 

+            or 2 frags you, it&#8217;s probably me. ;-)<br></font><br><br><a name="newsitem964429577,13375,"></a><table bgcolor="#003399" width="100%"><tbody><tr><td><font color="#ffffff" face="Verdana,arial" size="2"><b>Monday, 

                   July 24, 2000</b></font></td></tr></tbody></table>
 <br><!--<hr noshade width=100%>--><b><u><font color="#003366" face="Verdana, Arial" size="2">BP6 Q3 server up and 

             running..</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:tim@bp6.com">tim</a> @ 2:06AM PDT</small>  <a href="http://bp6.gamesquad.net/news/964429577,13375,.html"><img border="0" src="doc3_files/comments.gif">3 comments</a>