Add escaping code to the location bar.

2000-08-02  Seth Nickell  <seth@eazel.com>

	* libnautilus-extensions/nautilus-file-utilities.c:
	(nautilus_make_uri_from_input):
	Add escaping code to the location bar.
This commit is contained in:
Seth Nickell 2000-08-03 00:46:09 +00:00 committed by Seth Nickell
parent 6d4d325e0b
commit f10903d9aa
3 changed files with 45 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2000-08-02 Seth Nickell <seth@eazel.com>
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_make_uri_from_input):
Add escaping code to the location bar.
2000-08-02 Michael Engber <engber@eazel.com>
* src/nautilus-application.c: (nautilus_application_startup),
@ -14,6 +20,7 @@
2 new corba calls for nautilus shell, one for starting the
desktop and one for quitting.
>>>>>>> 1.1212
2000-08-02 John Sullivan <sullivan@eazel.com>
Fixed bug 1877 (Customize window doesn't come to front if

View file

@ -110,13 +110,28 @@ nautilus_format_uri_for_display (const char *uri)
char *
nautilus_make_uri_from_input (const char *location)
{
gchar *toreturn;
char *toreturn, *escaped;
const char *no_method;
int method_length;
/* FIXME: add escaping logic to this function */
if (location[0] == '/') {
toreturn = g_strconcat (DEFAULT_SCHEME, location, NULL);
escaped = gnome_vfs_escape_path_string (location);
toreturn = g_strconcat (DEFAULT_SCHEME, escaped, NULL);
g_free (escaped);
} else {
toreturn = strdup (location);
no_method = strchr (location, ':');
if (no_method == NULL) {
no_method = location;
} else {
no_method++;
}
method_length = (no_method - location);
escaped = gnome_vfs_escape_path_string (no_method);
toreturn = g_new (char, strlen (escaped) + method_length + 1);
toreturn[0] = '\0';
strncat (toreturn, location, method_length);
strcat (toreturn, escaped);
}
return toreturn;

View file

@ -110,13 +110,28 @@ nautilus_format_uri_for_display (const char *uri)
char *
nautilus_make_uri_from_input (const char *location)
{
gchar *toreturn;
char *toreturn, *escaped;
const char *no_method;
int method_length;
/* FIXME: add escaping logic to this function */
if (location[0] == '/') {
toreturn = g_strconcat (DEFAULT_SCHEME, location, NULL);
escaped = gnome_vfs_escape_path_string (location);
toreturn = g_strconcat (DEFAULT_SCHEME, escaped, NULL);
g_free (escaped);
} else {
toreturn = strdup (location);
no_method = strchr (location, ':');
if (no_method == NULL) {
no_method = location;
} else {
no_method++;
}
method_length = (no_method - location);
escaped = gnome_vfs_escape_path_string (no_method);
toreturn = g_new (char, strlen (escaped) + method_length + 1);
toreturn[0] = '\0';
strncat (toreturn, location, method_length);
strcat (toreturn, escaped);
}
return toreturn;