[gnome-maps] placeBubble: Don't show invalid URLs



commit 96560d3362a921bef8aa1a0c4f61bd0a4abdb4b7
Author: James Westman <james flyingpimonster net>
Date:   Tue Nov 17 17:02:16 2020 -0600

    placeBubble: Don't show invalid URLs

 src/placeBubble.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/placeBubble.js b/src/placeBubble.js
index 96495366..d0d75d14 100644
--- a/src/placeBubble.js
+++ b/src/placeBubble.js
@@ -112,10 +112,12 @@ var PlaceBubble = GObject.registerClass({
         let content = [];
 
         if (place.website) {
-            content.push({ label: _("Website"),
-                           icon: 'web-browser-symbolic',
-                           info: GLib.markup_escape_text(place.website, -1),
-                           linkUrl: place.website });
+            if (Utils.isValidWebsite(place.website)) {
+                content.push({ label: _("Website"),
+                               icon: 'web-browser-symbolic',
+                               info: GLib.markup_escape_text(place.website, -1),
+                               linkUrl: place.website });
+            }
         }
 
         if (place.phone) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]