diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2000-08-22 23:36:12 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2000-08-22 23:36:12 +0000 |
commit | 52402ce7ebfc7af69c4f7789338fcd74f3a05e30 (patch) | |
tree | d184ab79c33510ffc211b0d7d651300e513b9ba3 /uri.c | |
parent | af7fc34f223d9ac48daae56c3810fb3dce827284 (diff) | |
download | android_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.tar.gz android_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.tar.bz2 android_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.zip |
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
Diffstat (limited to 'uri.c')
-rw-r--r-- | uri.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1024,6 +1024,7 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash) { *str = cur; return(-1); } + path[len] = '\0'; if (uri->path != NULL) memcpy(path, uri->path, len2); if (slash) { @@ -1614,6 +1615,13 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) { */ 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++]; } |