summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/uri.c b/uri.c
index 13c875b..b89603c 100644
--- a/uri.c
+++ b/uri.c
@@ -980,6 +980,7 @@ xmlURIEscape(const xmlChar * str)
if (uri->user) {
segment = xmlURIEscapeStr(BAD_CAST uri->user, BAD_CAST ";:&=+$,");
NULLCHK(segment)
+ ret = xmlStrcat(ret,BAD_CAST "//");
ret = xmlStrcat(ret, segment);
ret = xmlStrcat(ret, BAD_CAST "@");
xmlFree(segment);
@@ -988,7 +989,8 @@ xmlURIEscape(const xmlChar * str)
if (uri->server) {
segment = xmlURIEscapeStr(BAD_CAST uri->server, BAD_CAST "/?;:@");
NULLCHK(segment)
- ret = xmlStrcat(ret, BAD_CAST "//");
+ if (uri->user == NULL)
+ ret = xmlStrcat(ret, BAD_CAST "//");
ret = xmlStrcat(ret, segment);
xmlFree(segment);
}