1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00

application: fix 'tel:' URL handling with escaped symbols

It's common to have spaces or other separator characters in telephone
numbers. If tel: link (example: tel:+1 855-698-1150) is clicked in browser all
unsupported characters are escaped (example: tel:+1%20(855)%20698-11-50).
This commit is contained in:
Andrey Skvortsov 2022-06-12 01:19:50 +03:00 committed by Evangelos Ribeiro Tzaras
parent 01b214c5fb
commit e8895e9387

View file

@ -309,10 +309,11 @@ open_tel_uri (CallsApplication *self,
const char *uri)
{
const char *number = NULL;
g_autofree char* uri_str = g_uri_unescape_string(uri, NULL);
g_debug ("Opening tel URI `%s'", uri);
number = &uri[4]; // tel:NUMBER
number = &uri_str[4]; // tel:NUMBER
if (!number || !*number) {
g_autofree char *msg =
g_strdup_printf (_("Tried dialing invalid tel URI `%s'"), uri);