[gnome-maps/wip/mlundblad/libsoup3: 3/7] osmEditDialog: Use GLib.uri_unescape_string()




commit f02377efe83ca87d732de350a0b919ab89574db9
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed Aug 17 21:55:05 2022 +0200

    osmEditDialog: Use GLib.uri_unescape_string()
    
    Change from libsoup's URI escape functionallity
    to using the one from GLib, as that API is removed
    in libsoup3.

 src/osmEditDialog.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/osmEditDialog.js b/src/osmEditDialog.js
index 4c0faf49..787d9bc2 100644
--- a/src/osmEditDialog.js
+++ b/src/osmEditDialog.js
@@ -29,7 +29,6 @@ import Gio from 'gi://Gio';
 import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
 import Gtk from 'gi://Gtk';
-import Soup from 'gi://Soup';
 
 import {Application} from './application.js';
 import GnomeMaps from 'gi://GnomeMaps';
@@ -74,7 +73,7 @@ var _osmPhoneRewriteFunc = function(text) {
     if (GLib.uri_parse_scheme(text) === 'tel') {
         let afterTel = text.replace('tel:', '');
 
-        return Soup.uri_decode(afterTel.split(';')[0]);
+        return GLib.uri_unescape_string(afterTel.split(';')[0], null);
     } else {
         return text;
     }
@@ -89,7 +88,7 @@ var _osmEmailRewriteFunc = function(text) {
     if (GLib.uri_parse_scheme(text) === 'mailto') {
         let afterMailto = text.replace('mailto:', '');
 
-        return Soup.uri_decode(afterMailto.split('?')[0]);
+        return GLib.uri_unescape_string(afterMailto.split('?')[0], null);
     } else {
         return text;
     }


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