summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2007-08-26 10:54:57 +0200
committerMike Hommey <glandium@debian.org>2007-08-26 10:54:57 +0200
commit2b6861bb726172b0a9946e7d31ff4ca163bae6df (patch)
tree3e66058a45f841a1155d57ee239f663535eb6bfe /uri.c
parent36cccb83804d8cbd041066d7610c137329e16878 (diff)
parentc69572cb9f2467259a73de64c08e141f21f17fa8 (diff)
downloadlibxml2-debian/2.6.30.dfsg-1.tar.gz
New upstream releasedebian/2.6.30.dfsg-1
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 4f5e182..34841af 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