We have moved to a new Sailfish OS Forum. Please start new discussions there.
26

[Fixed in 2.0.0]Percent-encoded tel:-links broken, '+' becomes '2' [answered]

Tracked by Jolla (In release)

asked 2014-12-18 21:08:33 +0200

attah gravatar image

updated 2015-10-22 22:33:51 +0200

I found out recently that percent-encoded tel:-links aren't working. Just wanted to leave reporting it until U10 to make sure. Hitta.se (people directory for .se) for example puts people's phone numbers in tel:-links (nice!), but the leading '+' is percent-encoeded, making it look like this (for +46 123456789):

tel:%2B46123456789

instead of this (which is not allowed, see below):

tel:+46123456789

Broken phone number

The phone app seems to receive the entire string, just skip the '%' and 'B', and interpret it as "246123456789" and that won't work of course. This is pretty understandable since '+' is a reserved character in uri:s... Probably Hitta.se aren't alone to use country code prefixes, but i really haven't done a big survey, so please do add your own findings as comments.

I suggest that Jolla adds expanding %-encoding in the tel:-handling.

UPDATE: Still present in:

  • 1.1.2.15
  • 1.1.4.28
  • 1.1.6.27
  • 1.1.7.24

UPDATE: RFC 3966 says the following, which would imply that all properly formatted tel:-links containing a country code are broken:

If the reserved characters "+", ";", "=", and "?" are used as delimiters between components of the "tel" URI, they MUST NOT be percent encoded. These characters MUST be percent encoded if they appear in tel URI parameter values.

@Jolla: please acknowledge that you have seen this. I have no issues with it being low prio, just want to know that it'll get fixed when time allows. Am I somehow wrong, or why can't you just bring in this one line?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by attah
close date 2015-10-22 22:33:08.052244

Comments

1

Hej, it is the same when trying to dial from Alien Dalvik. Just saying. LVPVS out.

LVPVS ( 2014-12-20 23:19:50 +0200 )edit
1

Makes sense :) Thanks for checking. The fix below acts on the phone app, so it should help that too.

attah ( 2014-12-20 23:31:12 +0200 )edit

Hi, just wanted to share that I like the way how the bug report here is updated with each version number. Sometimes reading older reports you can't be sure if it's still there, but this is a way we could all adapt. What's your opinion @eric / @chemist ?

simo ( 2015-06-17 19:46:43 +0200 )edit

1 Answer

Sort by » oldest newest most voted
9

answered 2014-12-18 21:25:45 +0200

attah gravatar image

updated 2014-12-20 11:41:09 +0200

Couldn't help but poked around in the qml a bit.

Updated answer (2014-12-20) (from unescape+decodeURI to decodeURIComponent) with inspiration from here.

So here is a quick and dirty fix:

Try it at your own risk

--- /usr/share/voicecall-ui-jolla/main.qml.bak  2014-12-18 20:03:24.170745671 +0100
+++ /usr/share/voicecall-ui-jolla/main.qml  2014-12-20 10:27:07.711907547 +0100
@@ -321,7 +321,7 @@
                 return false
             }
             var number = ""
-            var url = decodeURI(arg[0])
+            var url = decodeURIComponent(arg[0])
             if (url.indexOf("tel://") === 0) {
                 number = url.substr(6)
             } else if (url.indexOf("tel:") === 0) {

Note: requires reboot, just closing the phone app seems to not reload the qml in the phone app.

edit flag offensive delete publish link more

Comments

1

@attah We have reproduced the bug and yes, decodeURIComponent() is the correct method which should be called.

tigeli ( 2015-08-26 23:53:10 +0200 )edit

Awesome! This makes me disproportionately happy.

attah ( 2015-08-27 00:00:06 +0200 )edit

Question tools

Follow
3 followers

Stats

Asked: 2014-12-18 21:08:33 +0200

Seen: 811 times

Last updated: Oct 22 '15