[calls] application: fix 'tel:' URL handling with escaped symbols
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] application: fix 'tel:' URL handling with escaped symbols
- Date: Wed, 15 Jun 2022 08:26:23 +0000 (UTC)
commit e8895e9387cb77c30806e406d913445b83db2a0b
Author: Andrey Skvortsov <andrej skvortzov gmail com>
Date: Sun Jun 12 01:19:50 2022 +0300
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 24c491c6..db2ec5f9 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]