Preserve %20 for pasting URLs into other windows
This commit is contained in:
parent
57d529d309
commit
1f08629a4f
1 changed files with 9 additions and 2 deletions
|
@ -828,7 +828,7 @@ sokoke_magic_uri (const gchar* uri)
|
||||||
* sokoke_uri_unescape_string:
|
* sokoke_uri_unescape_string:
|
||||||
* @uri: an URI string
|
* @uri: an URI string
|
||||||
*
|
*
|
||||||
* Unescape @uri if needed, and pass through '+'.
|
* Unescape @uri if needed, and pass through '+' and '%20'.
|
||||||
*
|
*
|
||||||
* Return value: a newly allocated URI
|
* Return value: a newly allocated URI
|
||||||
**/
|
**/
|
||||||
|
@ -836,7 +836,14 @@ gchar*
|
||||||
sokoke_uri_unescape_string (const gchar* uri)
|
sokoke_uri_unescape_string (const gchar* uri)
|
||||||
{
|
{
|
||||||
if (strchr (uri,'%'))
|
if (strchr (uri,'%'))
|
||||||
return g_uri_unescape_string (uri, "+");
|
{
|
||||||
|
/* Preserve %20 for pasting URLs into other windows */
|
||||||
|
gchar* unescaped = g_uri_unescape_string (uri, "+");
|
||||||
|
gchar* spaced = sokoke_replace_variables (unescaped, " ", "%20", NULL);
|
||||||
|
g_free (unescaped);
|
||||||
|
return spaced;
|
||||||
|
}
|
||||||
|
|
||||||
return g_strdup (uri);
|
return g_strdup (uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue