Like camel_url_encode, but works directly on an existing GString.

* camel-url.c (append_url_encoded): Like camel_url_encode, but
	works directly on an existing GString.
	(camel_url_to_string, output_param): Use it.
	(camel_url_encode): Likewise. Remove "escape_unsafe" arg since the
	"unsafe" chars are the ones that should *always* be escaped, and
	the places we were passing FALSE were wrong.
	(camel_url_decode): replace with a new version

	* camel-file-utils.c (camel_file_util_safe_filename): Remove extra
	arg to camel_url_encode.

	* tests/misc/url.c (main): Add tests of basic URL parsing and
	unparsing

svn path=/trunk/; revision=20545
This commit is contained in:
Dan Winship
2003-03-27 15:37:47 +00:00
parent b3293f0d99
commit be9db81541
6 changed files with 117 additions and 79 deletions

View File

@ -328,5 +328,5 @@ camel_file_util_safe_filename(const char *name)
if (name == NULL)
return NULL;
return camel_url_encode(name, TRUE, "/?()'*");
return camel_url_encode(name, "/?()'*");
}