summaryrefslogtreecommitdiff
path: root/uri.c
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2005-01-06 02:25:59 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2005-01-06 02:25:59 +0000
commitf3cf1a1e189d9f739195035bafe67c0168b28192 (patch)
tree81dc7b2c129a437c00d6702c86fc44d4412994e8 /uri.c
parent8fdc32abfe42f9f281cb9418789ddfa3cd8ccfa5 (diff)
downloadlibxml2-f3cf1a1e189d9f739195035bafe67c0168b28192.tar.gz
fixed problem with xmlURIEscape when query part was empty (actually fixed
* uri.c: fixed problem with xmlURIEscape when query part was empty (actually fixed xmlURIEscapeStr to return an empty string rather than NULL for empty string input) (bug 163079)
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/uri.c b/uri.c
index f62a3f65..fd6b5882 100644
--- a/uri.c
+++ b/uri.c
@@ -531,7 +531,7 @@ xmlSaveUri(xmlURIPtr uri) {
* @stream: a FILE* for the output
* @uri: pointer to an xmlURI
*
- * Prints the URI in the stream @steam.
+ * Prints the URI in the stream @stream.
*/
void
xmlPrintURI(FILE *stream, xmlURIPtr uri) {
@@ -874,6 +874,8 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) {
if (str == NULL)
return(NULL);
+ if (str[0] == 0)
+ return(xmlStrdup(str));
len = xmlStrlen(str);
if (!(len > 0)) return(NULL);
@@ -1690,7 +1692,7 @@ xmlParseURIReference(xmlURIPtr uri, const char *str) {
*
* URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
*
- * Returns a newly build xmlURIPtr or NULL in case of error
+ * Returns a newly built xmlURIPtr or NULL in case of error
*/
xmlURIPtr
xmlParseURI(const char *str) {