Return original URI if unescaping failed
The issue could be seen in the form of error messages: g_regex_replace_eval: assertion `string != NULL' failed
This commit is contained in:
parent
4bfbe5b30e
commit
243f93b70d
1 changed files with 2 additions and 0 deletions
|
@ -926,6 +926,8 @@ sokoke_uri_unescape_string (const gchar* uri)
|
||||||
{
|
{
|
||||||
/* Preserve %20 for pasting URLs into other windows */
|
/* Preserve %20 for pasting URLs into other windows */
|
||||||
gchar* unescaped = g_uri_unescape_string (uri, "+");
|
gchar* unescaped = g_uri_unescape_string (uri, "+");
|
||||||
|
if (!unescaped)
|
||||||
|
return g_strdup (uri);
|
||||||
gchar* spaced = sokoke_replace_variables (unescaped, " ", "%20", NULL);
|
gchar* spaced = sokoke_replace_variables (unescaped, " ", "%20", NULL);
|
||||||
g_free (unescaped);
|
g_free (unescaped);
|
||||||
return spaced;
|
return spaced;
|
||||||
|
|
Loading…
Reference in a new issue