[gnome-maps/wip/mlundblad/libsoup3: 5/8] osmUtils: Use GLib.uri_unescape_string()




commit 7974b76cc3b4f1269d6559daf78895b3e0ad1c14
Author: Marcus Lundblad <ml dfupdate se>
Date:   Wed Aug 17 22:01:33 2022 +0200

    osmUtils: 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/osmUtils.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/osmUtils.js b/src/osmUtils.js
index 5b8f8315..fd245a76 100644
--- a/src/osmUtils.js
+++ b/src/osmUtils.js
@@ -20,7 +20,7 @@
  * Author: Marcus Lundblad <ml update uu se>
  */
 
-import Soup from 'gi://Soup';
+import GLib from 'gi://GLib';
 
 import {Application} from './application.js';
 
@@ -36,7 +36,8 @@ export function getWikipediaOSMArticleFormatFromUrl(url) {
         let lang = match[1];
         let article = match[2];
 
-        return lang + ':' + Soup.uri_decode(article).replace(/_/g, ' ');
+        return lang + ':' +
+               GLib.uri_unescape_string(article, null).replace(/_/g, ' ');
     } else {
         return null;
     }


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