From 504201966dbcc76b0d3c60d85e36133188620f6c Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Fri, 20 Jul 2007 01:09:08 +0000 Subject: [PATCH] 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 --- ChangeLog | 4 ++++ uri.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e71bdff..23e44ae0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jul 19 18:10:58 PDT 2007 William Brack + + * uri.c: applied patch from from Patrik Fimml. Fixes bug #458268. + Wed Jul 18 11:05:08 PDT 2007 William Brack * xinclude.c: applied patch from bug #454608 from Patrik Fimml. 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