From e8895e9387cb77c30806e406d913445b83db2a0b Mon Sep 17 00:00:00 2001 From: Andrey Skvortsov Date: Sun, 12 Jun 2022 01:19:50 +0300 Subject: [PATCH] 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). --- src/calls-application.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calls-application.c b/src/calls-application.c index 24c491c..db2ec5f 100644 --- a/src/calls-application.c +++ b/src/calls-application.c @@ -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);