[gnome-maps] placeBubble: Remove spaces from tel URI
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] placeBubble: Remove spaces from tel URI
- Date: Wed, 2 Dec 2020 13:11:31 +0000 (UTC)
commit d3b6aca34c4359eda012ddb37a5db4621b54ffc3
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Wed Dec 2 09:26:29 2020 +0100
placeBubble: Remove spaces from tel URI
To conform better to RFC3966.
Closes:https://gitlab.gnome.org/GNOME/gnome-maps/-/issues/312
src/placeBubble.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/placeBubble.js b/src/placeBubble.js
index d0d75d14..32375df5 100644
--- a/src/placeBubble.js
+++ b/src/placeBubble.js
@@ -126,7 +126,9 @@ var PlaceBubble = GObject.registerClass({
info: GLib.markup_escape_text(place.phone, -1) };
if (Utils.uriSchemeSupported('tel')) {
- phone.linkUrl = 'tel:%s'.format(place.phone);
+ /* RFC3966 only allows "-", '.", "(", and ")" as visual
+ * separator characters in a global phone number, no space */
+ phone.linkUrl = 'tel:%s'.format(place.phone.replace(/\s+/g, ''));
}
content.push(phone);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]