587663 Incorrect Attribute-Value Normalization

* parser.c: when replacing entities and that the entity is CDATA and
  reference entities then white space character in replacement text
  need to be replaced by 0x20
* result/noent/att10: correct the output of the associated regression
  test
diff --git a/parser.c b/parser.c
index dfdde8f..0a10b0f 100644
--- a/parser.c
+++ b/parser.c
@@ -3705,7 +3705,12 @@
 			if (rep != NULL) {
 			    current = rep;
 			    while (*current != 0) { /* non input consuming */
-				buf[len++] = *current++;
+                                if ((*current == 0xD) || (*current == 0xA) ||
+                                    (*current == 0x9)) {
+                                    buf[len++] = 0x20;
+                                    current++;
+                                } else
+                                    buf[len++] = *current++;
 				if (len > buf_size - 10) {
 				    growBuffer(buf, 10);
 				}