printers: avoid crashes when searching for printers w/ special chars

Since the dialog considers just  the hostname part from the URL,
unespacing the url avoids a backend crash.

https://bugzilla.gnome.org/show_bug.cgi?id=754248
This commit is contained in:
Felipe Borges 2015-09-03 13:16:37 +02:00
parent a81a5994e4
commit ac6b1acc1f

View file

@ -1386,7 +1386,11 @@ parse_uri (const gchar *uri,
*port = atoi (position + 1);
}
*host = resulting_host;
*host = g_uri_unescape_string (resulting_host,
G_URI_RESERVED_CHARS_GENERIC_DELIMITERS
G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS);
g_free (resulting_host);
return TRUE;
}