summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2007-07-20 01:09:08 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2007-07-20 01:09:08 +0000
commit504201966dbcc76b0d3c60d85e36133188620f6c (patch)
treed3e8b1f613e7fa41e668c459a61ea7d9ed5468a3 /uri.c
parentb0a94e8bfaaa726a1ca823989d28201ccaf6f90f (diff)
downloadlibxml2-504201966dbcc76b0d3c60d85e36133188620f6c.tar.gz
applied patch from from Patrik Fimml. Fixes bug #458268
* uri.c: applied patch from from Patrik Fimml. Fixes bug #458268 svn path=/trunk/; revision=3645
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/uri.c b/uri.c
index 4f5e182f..34841af6 100644
--- a/uri.c
+++ b/uri.c
@@ -2258,7 +2258,8 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
uptr = (xmlChar *) ref->path;
if (*uptr == '/')
uptr++;
- val = xmlStrdup(uptr);
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,");
}
goto done;
}
@@ -2322,7 +2323,8 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
if (nbslash == 0) {
if (uptr != NULL)
- val = xmlStrdup (uptr);
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(uptr, BAD_CAST "/;&=+$,");
goto done;
}
@@ -2362,6 +2364,12 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
vptr[len - 1] = 0;
}
+ /* escape the freshly-built path */
+ vptr = val;
+ /* exception characters from xmlSaveUri */
+ val = xmlURIEscapeStr(vptr, BAD_CAST "/;&=+$,");
+ xmlFree(vptr);
+
done:
/*
* Free the working variables