bug fixes, bugfixes, bugfixes ...
- parser.c: Fixed Bug#21552: libxml fails to decode &
- uri.c testUri.c patches, by Marc Sanfacon (1 left)
- parser.c HTMLparser.c: HTML/encoding push problems reportedi by Wayne Davison
Daniel
diff --git a/uri.c b/uri.c
index 1ed1410..28810c7 100644
--- a/uri.c
+++ b/uri.c
@@ -1024,6 +1024,7 @@
 	    *str = cur;
 	    return(-1);
 	}
+	path[len] = '\0';
 	if (uri->path != NULL)
 	    memcpy(path, uri->path, len2);
 	if (slash) {
@@ -1614,6 +1615,13 @@
      */
     if (ref->path != NULL) {
 	index = 0;
+	/*
+	 * Ensure the path includes a '/'
+	 */
+	if (res->path[0] != '/' && ref->path[0] != 0 &&
+	    ref->path[index] != '/') {
+	    res->path[out++] = '/';
+	}
 	while (ref->path[index] != 0) {
 	    res->path[out++] = ref->path[index++];
 	}